MCS API

This is a Postman Collection for the Multi-Chain Storage API v1 endpoints. The page below describes different components of our API offering.

Common

Get system config

GET https://mcs-api.filswan.com/api/v1/common/system/params

This endpoint allows you to get system config

Path Parameters

Name
Type
Description

limit

String

When not provided, use default: 100

{
    "status": "success",
    "code": "200",
    "data": {
        "LOCK_TIME": "6",
        "MINT_CONTRACT": "0x1A1e5AC88C493e0608C84c60b7bb5f04D9cF50B3",
        "PAY_GAS_LIMIT": "9999999",
        "PAY_WITH_MULTIPLY_FACTOR": "1.5",
        "RECIPIENT": "0xABeAAb124e6b52afFF504DB71bbF08D0A768D053",
        "SWAN_PAYMENT_CONTRACT_ADDRESS": "0x7ab09f9Ab4D39cfBE0551dfb6AdAc63C89bB955b",
        "USDC_ADDRESS": "0xe11A86849d99F524cAC3E7A0Ec1241828e332C62"
    }
}

Get host info

GET https://mcs-api.filswan.com/api/v1/common/host/info

Upload file

Get USDC/Filecoin exchange rate

GET https://mcs-api.filswan.com/api/v1/billing/price/filecoin

This endpoint allows you to get the current exchange rate of USDC against Filecoin.

Get average Filecoin statistics.

GET https://api.filswan.com/stats/storage

This endpoint allows you to get average Filecoin storage price.

Upload to IPFS

POST https://mcs-api.filswan.com/api/v1/storage/ipfs/upload

This endpoint allows you to upload your file to IPFS server.

Request Body

Name
Type
Description

file*

Binary

file to be uploaded

duration*

String

days for the uploaded file to be kept on miner

file_type*

String

0:uploaded by user, 1:uploaded by nft

wallet_address*

String

wallet address used to pay

Batch Upload to IPFS

POST https://mcs-api.filswan.com/api/v1/storage/ipfs/batchupload

This endpoint allows you to batch upload your file to IPFS server.

Request Body

Name
Type
Description

wallet_address*

String

wallet address used to pay

files*

Binary

file to be uploaded

duration*

String

days for the uploaded file to be kept on miner

file_type*

String

0:uploaded by user, 1:uploaded by nft

My files

Get uploaded file list

GET https://mcs-api.filswan.com/api/v1/storage/tasks/deals

This endpoint allows you to get a list of your uploaded files.

Path Parameters

Name
Type
Description

file_name

String

file name of the uploaded file

page_size

Number

upper limit or records to return this time

page_number

Number

if not a valid number, or <=0, then 1, else use provided value

wallet_address*

String

uploaded under this wallet

payload_cid

String

payload cid of the car file for uploaded file

Get deal details

GET https://mcs-api.filswan.com/api/v1/storage/deal/detail/<deal_id>

This endpoint allows you to get deal details and DAO details.

Path Parameters

Name
Type
Description

payload_cid*

String

payload cid of the car file for uploaded file

get deal logs

GET https://mcs-api.filswan.com/api/v1/storage/deal/log/<deal_cid>

This endpoint allows you to get offline deal logs

Get payment information

GET https://mcs-api.filswan.com/api/v1/billing/deal/lockpayment/info

This endpoint allows you to get the specific payment information by payload CID.

Path Parameters

Name
Type
Description

payload_cid*

String

payload cid of the car file for the source file

Record mint info

POST https://mcs-api.filswan.com/api/v1/storage/mint/info

This endpoint allows to record mint info to mcs database.

Request Body

Name
Type
Description

payload_cid*

String

tx_hash*

String

token_id*

String

mint_address*

String

Billing history

Get billing history

GET https://mcs-api.filswan.com/api/v1/billing

This endpoint allows you to get the billing history related to current wallet account.

Path Parameters

Name
Type
Description

wallet_address*

String

wallet who pay the file

tx_hash

String

transaction hash of payment

page_size

Number

when empty, use default:10, max records returned each time

page_number

Number

when empty string, then 1

Last updated