简体中文

1、Introduction

Welcome to the API documentation. This guide outlines the details of the fund transfer API interfaces, including instructions for access and signature authentication.

2、Connection Instructions

2.1 Access URLs

REST API

2.2 Rate Limiting Rules

Rate limiting rules are applied to the interface. Currently, the restricting access to 10 requests per second per interface.

Users can adjust their access strategy based on the information in the HTTP Header.

3、Signature Authentication

3.1 Signature Instructions

API requests transmitted over the internet are highly likely to be tampered with. To ensure that the requests have not been altered, all private interfaces (excluding public interfaces such as basic information and market data) must use your API Key for signature authentication to verify whether the parameters or parameter values have been changed during transmission. (The encoding set is unified as "UTF-8")

A valid request consists of the following parts:

3.2 Signature Steps

It's important to standardize the request before calculating the signature, because when using HmacSHA256 for signature calculation, different content will produce completely different results. Therefore, before calculating the signature, please ensure that the request is properly standardized. The following example demonstrates this process using a fund transfer request.

The reference for the API key and secret key for the request is as follows:

AccessKeyId: e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx

AccessSecret: 1KFjiTRVlGSyzoNIEXIx8boXe7njFmjeHwiK4kKkEOY=

The URL for initiating a fund transfer request is as follows:

1. Request method (GET or POST) followed by a newline character "\n"

POST\n

2. Add the lowercase access address followed by a newline character "\n"

api.satsresearch.com\n

3. Access method path followed by a newline character "\n"

/api/v1/broker/transferFunds\n

4. Sort the parameter names in ASCII order. For example, here is the original sequence of request parameters after encoding:

AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxxSignatureMethod=HmacSHA256SignatureVersion=1Timestamp=1662022581951

Use UTF-8 encoding and perform URI encoding. Hexadecimal characters must be uppercase, such as encoding ":" as "%3A" and space as "%20".

After sorting,

AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx

SignatureMethod=HmacSHA256

SignatureVersion=1

Timestamp=1662022581951

5. Connect the parameters using the character "&" according to the above order.

AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=1&Timestamp=16620225819511

6. Form the final string to be used for signature calculation as follows:

POST\n

api.satsresearch.com\n

/api/v1/broker/transferFunds\n

AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=1&Timestamp=1662022581951

7. Use the "request string" generated in the previous step and your Secret Key to generate a digital signature.

1KFjiTRVlGSyzoNIEXIx8boXe7njFmjeHwiK4kKkEOY=

  1. Use the request string obtained in the previous step and the secret key as two parameters to call the HmacSHA256 signature function to obtain the signature information.
  2. Encode this signature information using base-64, and use the resulting value as the digital signature for this API call.

8. Add the generated digital signature to the request's path parameters.

Finally, the API request sent to the server should be:

https://api.satsresearch.com/api/v1/broker/transferFunds?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=1&Timestamp=1662022581951&Signature=d5qMEazCAgwpLyUyhwsmIUYZytfzgPjBO6ykluyjzi4=

4、Business Enumerations

Exchange Enumerations

Enumeration Description Note
binance Binance Exchange
bybit bybit Exchange
okx okx Exchange
gate gate Exchange

*Account Type Enumerations *

Exchange Enumeration Values Notes
binance Classic Accounts: Spot, Margin, USDT-M, Coin-M Unified Accounts: Spot, Margin The default is Spot. Sub-accounts for custody are not currently supported.
bybit Classic Accounts: Spot, Funding, USDT-M, Coin-M Unified Accounts: Funding, Trading, Coin-M The default is Funding
okx Funding, Trading The default is Funding
gate Spot,USDT-M,USDT-M-Futures The default is Spot

5、API Details

5.1 Fund Transfer

HTTP Request

Request Parameters

Name Type Required Description
clientTransferId String Y Client-defined transfer ID
asset String Y Transfer asset name
fromExchange String Y Source exchange, refer to exchange enumeration
fromSubAccount String Y Source sub-account, refer to exchange enumeration
fromAccountType String N Withdrawal account type, refer to account type enumeration
toExchange String Y Destination exchange, refer to exchange enumeration
toSubAccount String Y Destination sub-account, refer to exchange enumeration
toAccountType String N Deposit account type, refer to account type enumeration
applyAmount Number Y Initiated amount, greater than 10U

Response:

{
  "msg": "success",
  "code": 200,
  "data": [
    {
      "clientTransferId": "4e8c51b7-97ac-4ef1-864f-7869f13c0c6f",
      "transferId": "4e8c51b797ac4ef1864f7869f13c0c6f"
    }
  ],
  "ts": 1679903538458
}

Note

Response Data

Name Type Required Description
clientTransferId String Y Custom transfer ID
transferId String Y Transfer record ID

5.2 Query Fund Transfer Record

HTTP Request

Request Parameters

Name Type Required Description
clientTransferId String N Client-defined transfer ID, choose either this or transferId.
transferId String N

Response:

{
    "msg": "success",
    "code": 200,
    "data": [
        {
            "clientTransferId": "4e8c51b7-97ac-4ef1-864f-7869f13c0c7f",
            "asset": "USDT",
            "fromExchange": "bingx",
            "fromSubAccount": "4665179554",
            "toExchange": "binance",
            "toSubAccount": "someacccount@binance.com",
            "applyAmount": "20",
            "realAmount": "19",
            "feeAmount": "1",
            "externalStatus": "done",
            "applyTime": 1715305243482,
            "arriveTime": null,
            "failReason": "exchange internal error."
        }
    ],
    "ts": 1715306224948
}

Response Data

Name Type Required Description
clientTransferId String Y Custom transfer ID
transferId String Y Transfer record ID
asset String Y Transfer asset name
fromExchange String Y Source exchange
fromSubAccount String Y Source account
fromAccountType String N Deposit account type
toExchange String Y Destination exchange
toSubAccount String Y Destination account
toAccountType String N Deposit account type
applyAmount String Y Initiated amount
realAmount String N Actual amount received
feeAmount String N Withdrawal fee amount
externalStatus String Y Status (pending, done, fail)
applyTime Long Y Submission time
arriveTime Long N Arrival time
failReason String N Reason for failure

5.3 Get Transfer Records

HTTP Request

Request Parameters

Name Type Required Description
clientTransferId String N Customer-defined transfer id (Customize)
transferId String N transferld
asset String N Name of asset transferred
fromExchange String N From Exchange (Refer to Exchange Enumeration)
fromSubAccount String N From Sub-account (Refer to Exchange Enumeration)
fromAccountType String N From Account Type (Refer to Account Type Enumeration)
toExchange String N To Exchange (Refer to Exchange Enumeration)
toSubAccount String N To Sub-account (Refer to Exchange Enumeration)
toAccountType String N To Account Type (Refer to Account Type Enumeration)
pageSize String N Pagination Data Length, Default: 10, Maximum: 1000
pageNum String N Start Page, Default: 1

Response:

{
    "msg": "success",
    "code": 200,
    "data": [
        {
            "clientTransferId": "4e8c51b7-97ac-4ef1-864f-7869f13c0c7f",
            "asset": "USDT",
            "fromExchange": "bingx",
            "fromSubAccount": "4665179554",
            "toExchange": "binance",
            "toSubAccount": "someacccount@binance.com",
            "applyAmount": "20",
            "realAmount": "19",
            "feeAmount": "1",
            "externalStatus": "done",
            "applyTime": 1715305243482,
            "arriveTime": null,
            "failReason": "exchange internal error."
        }
    ],
    "ts": 1715306224948
}

Response Data

Name Type Required Description
clientTransferId String Y Custom Transfer ID
transferId String Y Transfer ID
asset String Y Name of asset transferred
fromExchange String Y From Exchange
fromSubAccount String Y From Sub-Account
fromAccountType String N From Account Type
toExchange String Y To Exchange
toSubAccount String Y To Sub-Account
toAccountType String N To Account Type
applyAmount String Y Initiated Amount
realAmount String N Received Amount
feeAmount String N Withdrawal Fee Amount
externalStatus String Y Transfer status. pending: pending,done: success,fail: failed
applyTime Long Y Submission Time
arriveTime Long N Receipt Time
failReason String N Failure Reason

6、Error Codes

Error Code Status Code Description
200 200 Success
40000 400 General request error
40002 400 Invalid parameter {0}, please check and try again
45164 400 Fund transfer record already exists
45165 400 Invalid fund transfer accessKeyId
45166 400 Unsupported fund transfer currency
45169 400 Cross-exchange fund transfer record is being processed.
50000 500 Server error

7、Update Notes

20240716