> For the complete documentation index, see [llms.txt](https://docs-cn.filswan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-cn.filswan.com/multichain.storage/developer-quickstart-1/sdk/js-mcs-sdk/huo-qu-wen-jian-de-filecoin-zhuang-tai.md).

# 获取文件的Filecoin状态

```
getFileStatus(dealId)
```

下面的代码示例返回付费文件的 FIlecoin 存储状态。此方法需要交易的成交 ID。这也可以通过 getUploads 方法获得。

```
require('dotenv').config()
const { mcsSDK } = require('js-mcs-sdk')
const fs = require('fs') // used to read files

// set up js-mcs-sdk
const mcs = new mcsSDK({
  privateKey: process.env.PRIVATE_KEY,
  rpcUrl: process.env.RPC_URL,
})

async function main() {
  // ENTER PARAMETERS
  const DEAL_ID = 0
  
  const mintResponse = await mcs.getFileStatus(DEAL_ID)
  console.log(mintResponse)
}

main()
```

#### 参数 <a href="#can-shu-4" id="can-shu-4"></a>

* **dealId**： 文件的 deal id

#### 返回 <a href="#fan-hui-5" id="fan-hui-5"></a>

返回来自 `/deal/log/` API 的响应

```
{
  status: 'success',
  data: {
    offline_deal_log: [ [Object], [Object], [Object], [Object], [Object], [Object] ]
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-cn.filswan.com/multichain.storage/developer-quickstart-1/sdk/js-mcs-sdk/huo-qu-wen-jian-de-filecoin-zhuang-tai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
