Account API

AccountPrivateApi

GET Get Position Transaction Page

GET /api/v1/private/account/getPositionTransactionPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to retrieve. Must be greater than 0 and less than or equal to 100

offsetData

query

string

No

Pagination offset. If empty or not provided, the first page is retrieved

filterCoinIdList

query

string

No

Filter position transaction records by specified coin IDs. If not provided, all collateral transaction records are retrieved

filterContractIdList

query

string

No

Filter position transaction records by specified contract IDs. If not provided, all position transaction records are retrieved

filterTypeList

query

string

No

Filter position transaction records by specified types. If not provided, all position transaction records are retrieved

filterStartCreatedTimeInclusive

query

string

No

Filter position transaction records created after or at the specified start time (inclusive). If not provided or 0, retrieves records from the earliest time

filterEndCreatedTimeExclusive

query

string

No

Filter position transaction records created before the specified end time (exclusive). If not provided or 0, retrieves records up to the latest time

filterCloseOnly

query

string

No

Whether to return only position transactions that include closing positions. true: only return records with closing; false: return all records

filterOpenOnly

query

string

No

Whether to return only position transactions that include opening positions. true: only return records with opening; false: return all records

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564809510904923406",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "type": "SELL_POSITION",
                "deltaOpenSize": "-0.001",
                "deltaOpenValue": "-96.813200",
                "deltaOpenFee": "0.048406",
                "deltaFundingFee": "0.000000",
                "beforeOpenSize": "0.001",
                "beforeOpenValue": "96.813200",
                "beforeOpenFee": "-0.048406",
                "beforeFundingFee": "0",
                "fillCloseSize": "-0.001",
                "fillCloseValue": "-96.857100",
                "fillCloseFee": "-0.048428",
                "fillOpenSize": "0.000",
                "fillOpenValue": "0.000000",
                "fillOpenFee": "0.000000",
                "fillPrice": "96857.1",
                "liquidateFee": "0",
                "realizePnl": "-0.004528",
                "isLiquidate": false,
                "isDeleverage": false,
                "fundingTime": "0",
                "fundingRate": "",
                "fundingIndexPrice": "",
                "fundingOraclePrice": "",
                "fundingPositionSize": "",
                "orderId": "564809510842007822",
                "orderFillTransactionId": "564809510875562254",
                "collateralTransactionId": "564809510904922382",
                "forceTradeId": "0",
                "extraType": "",
                "extraDataJson": "",
                "censorStatus": "CENSOR_SUCCESS",
                "censorTxId": "892720",
                "censorTime": "1734661081049",
                "censorFailCode": "",
                "censorFailReason": "",
                "l2TxId": "1084271",
                "l2RejectTime": "0",
                "l2RejectCode": "",
                "l2RejectReason": "",
                "l2ApprovedTime": "0",
                "createdTime": "1734661081049",
                "updatedTime": "1734661081053"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734661416266",
    "responseTime": "1734661416277",
    "traceId": "a87a52a4e189045b7b7b9948ea7b5c54"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Position Transactions By Account ID and Transaction ID

GET /api/v1/private/account/getPositionTransactionById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

positionTransactionIdList

query

string

No

Position Transaction IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564809510904923406",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "type": "SELL_POSITION",
                "deltaOpenSize": "-0.001",
                "deltaOpenValue": "-96.813200",
                "deltaOpenFee": "0.048406",
                "deltaFundingFee": "0.000000",
                "beforeOpenSize": "0.001",
                "beforeOpenValue": "96.813200",
                "beforeOpenFee": "-0.048406",
                "beforeFundingFee": "0",
                "fillCloseSize": "-0.001",
                "fillCloseValue": "-96.857100",
                "fillCloseFee": "-0.048428",
                "fillOpenSize": "0.000",
                "fillOpenValue": "0.000000",
                "fillOpenFee": "0.000000",
                "fillPrice": "96857.1",
                "liquidateFee": "0",
                "realizePnl": "-0.004528",
                "isLiquidate": false,
                "isDeleverage": false,
                "fundingTime": "0",
                "fundingRate": "",
                "fundingIndexPrice": "",
                "fundingOraclePrice": "",
                "fundingPositionSize": "",
                "orderId": "564809510842007822",
                "orderFillTransactionId": "564809510875562254",
                "collateralTransactionId": "564809510904922382",
                "forceTradeId": "0",
                "extraType": "",
                "extraDataJson": "",
                "censorStatus": "CENSOR_SUCCESS",
                "censorTxId": "892720",
                "censorTime": "1734661081049",
                "censorFailCode": "",
                "censorFailReason": "",
                "l2TxId": "1084271",
                "l2RejectTime": "0",
                "l2RejectCode": "",
                "l2RejectReason": "",
                "l2ApprovedTime": "0",
                "createdTime": "1734661081049",
                "updatedTime": "1734661081053"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734661416266",
    "responseTime": "1734661416277",
    "traceId": "a87a52a4e189045b7b7b9948ea7b5c54"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Position Term Page by Account ID

GET /api/v1/private/account/getPositionTermPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to retrieve. Must be greater than 0 and less than or equal to 100

offsetData

query

string

No

Pagination offset. If empty or not provided, the first page is retrieved

filterCoinIdList

query

string

No

Filter position term records by specified coin IDs. If not provided, all position term records are retrieved

filterContractIdList

query

string

No

Filter position term records by specified contract IDs. If not provided, all position term records are retrieved

filterIsLongPosition

query

string

No

Filter position term records by position direction. If not provided, all position term records are retrieved

filterStartCreatedTimeInclusive

query

string

No

Filter position term records created after or at the specified start time (inclusive). If not provided or 0, retrieves records from the earliest time

filterEndCreatedTimeExclusive

query

string

No

Filter position term records created before the specified end time (exclusive). If not provided or 0, retrieves records up to the latest time

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "termCount": 2,
                "cumOpenSize": "0.001",
                "cumOpenValue": "96.813000",
                "cumOpenFee": "-0.048406",
                "cumCloseSize": "0",
                "cumCloseValue": "0",
                "cumCloseFee": "0",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0",
                "createdTime": "1734661093450",
                "updatedTime": "1734661093450",
                "currentLeverage": "50"
            },
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "termCount": 1,
                "cumOpenSize": "0.001",
                "cumOpenValue": "96.813200",
                "cumOpenFee": "-0.048406",
                "cumCloseSize": "-0.001",
                "cumCloseValue": "-96.857100",
                "cumCloseFee": "-0.048428",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0",
                "createdTime": "1734661018663",
                "updatedTime": "1734661081053",
                "currentLeverage": "50"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734661416272",
    "responseTime": "1734661416281",
    "traceId": "ad4515e50fa7a57610736753d8f987aa"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Position By Account ID and Contract ID

GET /api/v1/private/account/getPositionByContractId

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

contractIdList

query

string

No

Specified contract IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "contractId": "10000001",
            "openSize": "0.001",
            "openValue": "97.444500",
            "openFee": "-0.017540",
            "fundingFee": "0.000000",
            "longTermCount": 3,
            "longTermStat": {
                "cumOpenSize": "0.001",
                "cumOpenValue": "97.444500",
                "cumOpenFee": "-0.017540",
                "cumCloseSize": "0",
                "cumCloseValue": "0",
                "cumCloseFee": "0",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0"
            },
            "longTermCreatedTime": "1734662617992",
            "longTermUpdatedTime": "1734662617992",
            "shortTermCount": 0,
            "shortTermStat": {
                "cumOpenSize": "0",
                "cumOpenValue": "0",
                "cumOpenFee": "0",
                "cumCloseSize": "0",
                "cumCloseValue": "0",
                "cumCloseFee": "0",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0"
            },
            "shortTermCreatedTime": "0",
            "shortTermUpdatedTime": "0",
            "longTotalStat": {
                "cumOpenSize": "0.004",
                "cumOpenValue": "388.464500",
                "cumOpenFee": "-0.131882",
                "cumCloseSize": "-0.003",
                "cumCloseValue": "-291.736700",
                "cumCloseFee": "-0.083506",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0"
            },
            "shortTotalStat": {
                "cumOpenSize": "0",
                "cumOpenValue": "0",
                "cumOpenFee": "0",
                "cumCloseSize": "0",
                "cumCloseValue": "0",
                "cumCloseFee": "0",
                "cumFundingFee": "0",
                "cumLiquidateFee": "0"
            },
            "createdTime": "1734661018663",
            "updatedTime": "1734662617992"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734664849770",
    "responseTime": "1734664849790",
    "traceId": "17a421d1b23652c5b3836239274b0352"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

Inline

Response Data Structure

GET Get Collateral Transaction Page by Account ID

GET /api/v1/private/account/getCollateralTransactionPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to retrieve. Must be greater than 0 and less than or equal to 100

offsetData

query

string

No

Pagination offset. If empty or not provided, the first page is retrieved

filterCoinIdList

query

string

No

Filter collateral transaction records by specified coin IDs. If not provided, all collateral transaction records are retrieved

filterTypeList

query

string

No

Filter collateral transaction records by specified transaction types. If not provided, all collateral transaction records are retrieved

filterStartCreatedTimeInclusive

query

string

No

Filter collateral transaction records created after or at the specified start time (inclusive). If not provided or 0, retrieves records from the earliest time

filterEndCreatedTimeExclusive

query

string

No

Filter collateral transaction records created before the specified end time (exclusive). If not provided or 0, retrieves records up to the latest time

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564815957260763406",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "orderId": "564815695875932430",
                "orderSide": "BUY",
                "fillSize": "0.001",
                "fillValue": "97.4445",
                "fillFee": "0.017540",
                "fillPrice": "97444.5",
                "liquidateFee": "0",
                "realizePnl": "-0.017540",
                "direction": "MAKER",
                "isPositionTpsl": false,
                "isLiquidate": false,
                "isDeleverage": false,
                "isWithoutMatch": false,
                "matchSequenceId": "35196430",
                "matchIndex": 0,
                "matchTime": "1734662617982",
                "matchAccountId": "555790606509539863",
                "matchOrderId": "564815957235597591",
                "matchFillId": "05d14491-db7d-478a-9d9f-2dc55c3ff3ca",
                "positionTransactionId": "564815957294318862",
                "collateralTransactionId": "564815957294317838",
                "extraType": "",
                "extraDataJson": "",
                "censorStatus": "CENSOR_SUCCESS",
                "censorTxId": "893031",
                "censorTime": "1734662617988",
                "censorFailCode": "",
                "censorFailReason": "",
                "l2TxId": "1084582",
                "l2RejectTime": "0",
                "l2RejectCode": "",
                "l2RejectReason": "",
                "l2ApprovedTime": "0",
                "createdTime": "1734662617984",
                "updatedTime": "1734662617992"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734662681040",
    "responseTime": "1734662681051",
    "traceId": "770fcce6222c2d88b65b4ecb36e84c43"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

Inline

Response Data Structure

GET Get Collateral Transactions By Account ID and Transaction ID

GET /api/v1/private/account/getCollateralTransactionById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

collateralTransactionIdList

query

string

No

Collateral Transaction IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "563516408265179918",
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "type": "DEPOSIT",
            "deltaAmount": "10.000000",
            "deltaLegacyAmount": "10.000000",
            "beforeAmount": "6.000000",
            "beforeLegacyAmount": "6.000000",
            "fillCloseSize": "",
            "fillCloseValue": "",
            "fillCloseFee": "",
            "fillOpenSize": "",
            "fillOpenValue": "",
            "fillOpenFee": "",
            "fillPrice": "",
            "liquidateFee": "",
            "realizePnl": "",
            "isLiquidate": false,
            "isDeleverage": false,
            "fundingTime": "0",
            "fundingRate": "",
            "fundingIndexPrice": "",
            "fundingOraclePrice": "",
            "fundingPositionSize": "",
            "depositId": "563516408235819790",
            "withdrawId": "0",
            "transferInId": "0",
            "transferOutId": "0",
            "transferReason": "UNKNOWN_TRANSFER_REASON",
            "orderId": "0",
            "orderFillTransactionId": "0",
            "orderAccountId": "0",
            "positionContractId": "0",
            "positionTransactionId": "0",
            "forceWithdrawId": "0",
            "forceTradeId": "0",
            "extraType": "",
            "extraDataJson": "",
            "censorStatus": "L2_APPROVED",
            "censorTxId": "830852",
            "censorTime": "1734352781355",
            "censorFailCode": "",
            "censorFailReason": "",
            "l2TxId": "1022403",
            "l2RejectTime": "0",
            "l2RejectCode": "",
            "l2RejectReason": "",
            "l2ApprovedTime": "1734353551654",
            "createdTime": "1734352781355",
            "updatedTime": "1734353551715"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734664486740",
    "responseTime": "1734664486761",
    "traceId": "b3086f53c2d4503f6a4790b80f0e534b"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

Inline

Response Data Structure

GET Get Collateral By Account ID and Coin ID

GET /api/v1/private/account/getCollateralByCoinId

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

coinIdList

query

string

No

Filter collateral information by specified coin IDs. If not provided, all collateral information is retrieved

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "amount": "-81.943188",
            "legacyAmount": "15.501312",
            "cumDepositAmount": "70.000000",
            "cumWithdrawAmount": "0",
            "cumTransferInAmount": "0",
            "cumTransferOutAmount": "-55.000000",
            "cumPositionBuyAmount": "-388.4645",
            "cumPositionSellAmount": "291.7367",
            "cumFillFeeAmount": "-0.215388",
            "cumFundingFeeAmount": "0",
            "cumFillFeeIncomeAmount": "0",
            "createdTime": "1730204434094",
            "updatedTime": "1734663352066"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734664569244",
    "responseTime": "1734664569260",
    "traceId": "4b7ff82fb92aa3b10d9fc0367a069270"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

Inline

Response Data Structure

GET Get Account Page by User ID

GET /api/v1/private/account/getAccountPage

Request Parameters

Name
Location
Type
Required
Description

size

query

string

No

Number of items to retrieve. Must be greater than 0 and less than or equal to 100

offsetData

query

string

No

Pagination offset. If empty or not provided, the first page is retrieved

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "543429922991899150",
                "userId": "543429922866069763",
                "ethAddress": "0x1fB51aa234287C3CA1F957eA9AD0E148Bb814b7A",
                "l2Key": "0x5580341e2c99823a0a35356b8ac84e372dd38fd1f4b50f607b931ec8038c211",
                "l2KeyYCoordinate": "0x6ea3dd81a7fc864893c8c6f674e4a4510c369f939bdc0259a0980dfde882c2d",
                "clientAccountId": "main",
                "isSystemAccount": false,
                "defaultTradeSetting": {
                    "isSetFeeRate": true,
                    "takerFeeRate": "0.000500",
                    "makerFeeRate": "0.000180",
                    "isSetFeeDiscount": false,
                    "takerFeeDiscount": "0",
                    "makerFeeDiscount": "0",
                    "isSetMaxLeverage": false,
                    "maxLeverage": "0"
                },
                "contractIdToTradeSetting": {
                    "10000001": {
                        "isSetFeeRate": false,
                        "takerFeeRate": "",
                        "makerFeeRate": "",
                        "isSetFeeDiscount": false,
                        "takerFeeDiscount": "",
                        "makerFeeDiscount": "",
                        "isSetMaxLeverage": true,
                        "maxLeverage": "50"
                    }
                },
                "maxLeverageLimit": "0",
                "createOrderPerMinuteLimit": 0,
                "createOrderDelayMillis": 0,
                "extraType": "",
                "extraDataJson": "",
                "status": "NORMAL",
                "isLiquidating": false,
                "createdTime": "1730204434094",
                "updatedTime": "1733993378059"
            }
        ],
        "nextPageOffsetData": "551109015904453258"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734661416005",
    "responseTime": "1734661416008",
    "traceId": "dc6a8442169c8cdb831ceb15c812b7fc"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Account Deleverage Light

GET /api/v1/private/account/getAccountDeleverageLight

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "positionContractIdToLightNumberMap": {
            "10000001": 3
        }
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734661307929",
    "responseTime": "1734661307935",
    "traceId": "202ee8ba15ab633b68a35a8bc9756952"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Account By Account ID

GET /api/v1/private/account/getAccountById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "id": "543429922991899150",
        "userId": "543429922866069763",
        "ethAddress": "0x1fB51aa234287C3CA1F957eA9AD0E148Bb814b7A",
        "l2Key": "0x5580341e2c99823a0a35356b8ac84e372dd38fd1f4b50f607b931ec8038c211",
        "l2KeyYCoordinate": "0x6ea3dd81a7fc864893c8c6f674e4a4510c369f939bdc0259a0980dfde882c2d",
        "clientAccountId": "main",
        "isSystemAccount": false,
        "defaultTradeSetting": {
            "isSetFeeRate": true,
            "takerFeeRate": "0.000500",
            "makerFeeRate": "0.000180",
            "isSetFeeDiscount": false,
            "takerFeeDiscount": "0",
            "makerFeeDiscount": "0",
            "isSetMaxLeverage": false,
            "maxLeverage": "0"
        },
        "contractIdToTradeSetting": {
            "10000001": {
                "isSetFeeRate": false,
                "takerFeeRate": "",
                "makerFeeRate": "",
                "isSetFeeDiscount": false,
                "takerFeeDiscount": "",
                "makerFeeDiscount": "",
                "isSetMaxLeverage": true,
                "maxLeverage": "50"
            }
        },
        "maxLeverageLimit": "0",
        "createOrderPerMinuteLimit": 0,
        "createOrderDelayMillis": 0,
        "extraType": "",
        "extraDataJson": "",
        "status": "NORMAL",
        "isLiquidating": false,
        "createdTime": "1730204434094",
        "updatedTime": "1733993378059"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734664605752",
    "responseTime": "1734664605760",
    "traceId": "c7be70afbf00d7f879d2809e0f042dfe"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Account Asset

GET /api/v1/private/account/getAccountAsset

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "account": {
            "id": "543429922991899150",
            "userId": "543429922866069763",
            "ethAddress": "0x1fB51aa234287C3CA1F957eA9AD0E148Bb814b7A",
            "l2Key": "0x5580341e2c99823a0a35356b8ac84e372dd38fd1f4b50f607b931ec8038c211",
            "l2KeyYCoordinate": "0x6ea3dd81a7fc864893c8c6f674e4a4510c369f939bdc0259a0980dfde882c2d",
            "clientAccountId": "main",
            "isSystemAccount": false,
            "defaultTradeSetting": {
                "isSetFeeRate": true,
                "takerFeeRate": "0.000500",
                "makerFeeRate": "0.000180",
                "isSetFeeDiscount": false,
                "takerFeeDiscount": "0",
                "makerFeeDiscount": "0",
                "isSetMaxLeverage": false,
                "maxLeverage": "0"
            },
            "contractIdToTradeSetting": {
                "10000001": {
                    "isSetFeeRate": false,
                    "takerFeeRate": "",
                    "makerFeeRate": "",
                    "isSetFeeDiscount": false,
                    "takerFeeDiscount": "",
                    "makerFeeDiscount": "",
                    "isSetMaxLeverage": true,
                    "maxLeverage": "50"
                }
            },
            "maxLeverageLimit": "0",
            "createOrderPerMinuteLimit": 0,
            "createOrderDelayMillis": 0,
            "extraType": "",
            "extraDataJson": "",
            "status": "NORMAL",
            "isLiquidating": false,
            "createdTime": "1730204434094",
            "updatedTime": "1733993378059"
        },
        "collateralList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "amount": "-81.943188",
                "legacyAmount": "15.501312",
                "cumDepositAmount": "70.000000",
                "cumWithdrawAmount": "0",
                "cumTransferInAmount": "0",
                "cumTransferOutAmount": "-55.000000",
                "cumPositionBuyAmount": "-388.4645",
                "cumPositionSellAmount": "291.7367",
                "cumFillFeeAmount": "-0.215388",
                "cumFundingFeeAmount": "0",
                "cumFillFeeIncomeAmount": "0",
                "createdTime": "1730204434094",
                "updatedTime": "1734663352066"
            }
        ],
        "positionList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "openSize": "0.001",
                "openValue": "97.444500",
                "openFee": "-0.017540",
                "fundingFee": "0.000000",
                "longTermCount": 3,
                "longTermStat": {
                    "cumOpenSize": "0.001",
                    "cumOpenValue": "97.444500",
                    "cumOpenFee": "-0.017540",
                    "cumCloseSize": "0",
                    "cumCloseValue": "0",
                    "cumCloseFee": "0",
                    "cumFundingFee": "0",
                    "cumLiquidateFee": "0"
                },
                "longTermCreatedTime": "1734662617992",
                "longTermUpdatedTime": "1734662617992",
                "shortTermCount": 0,
                "shortTermStat": {
                    "cumOpenSize": "0",
                    "cumOpenValue": "0",
                    "cumOpenFee": "0",
                    "cumCloseSize": "0",
                    "cumCloseValue": "0",
                    "cumCloseFee": "0",
                    "cumFundingFee": "0",
                    "cumLiquidateFee": "0"
                },
                "shortTermCreatedTime": "0",
                "shortTermUpdatedTime": "0",
                "longTotalStat": {
                    "cumOpenSize": "0.004",
                    "cumOpenValue": "388.464500",
                    "cumOpenFee": "-0.131882",
                    "cumCloseSize": "-0.003",
                    "cumCloseValue": "-291.736700",
                    "cumCloseFee": "-0.083506",
                    "cumFundingFee": "0",
                    "cumLiquidateFee": "0"
                },
                "shortTotalStat": {
                    "cumOpenSize": "0",
                    "cumOpenValue": "0",
                    "cumOpenFee": "0",
                    "cumCloseSize": "0",
                    "cumCloseValue": "0",
                    "cumCloseFee": "0",
                    "cumFundingFee": "0",
                    "cumLiquidateFee": "0"
                },
                "createdTime": "1734661018663",
                "updatedTime": "1734662617992"
            }
        ],
        "version": "1021",
        "positionAssetList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "positionValue": "97.734426609240472316741943359375",
                "maxLeverage": "50",
                "initialMarginRequirement": "1.954688532184809446334838867187500000",
                "starkExRiskRate": "0.00500000012107193470001220703125",
                "starkExRiskValue": "0.48867214487909847796080764492643311314168386161327362060546875",
                "avgEntryPrice": "97444.5",
                "liquidatePrice": "82354.9",
                "bankruptPrice": "81943.1",
                "worstClosePrice": "81984.2",
                "unrealizePnl": "0.289926609240472316741943359375",
                "termRealizePnl": "0.000000",
                "totalRealizePnl": "0.716700"
            }
        ],
        "collateralAssetModelList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "totalEquity": "15.791238609240472316741943359375",
                "totalPositionValueAbs": "97.734426609240472316741943359375",
                "initialMarginRequirement": "1.954688532184809446334838867187500000",
                "starkExRiskValue": "0.48867214487909847796080764492643311314168386161327362060546875",
                "pendingWithdrawAmount": "0",
                "pendingTransferOutAmount": "0",
                "orderFrozenAmount": "0",
                "availableAmount": "13.836550"
            }
        ],
        "oraclePriceList": []
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734664627939",
    "responseTime": "1734664627957",
    "traceId": "4a3a5cd027ea6c255c8c944567b634f1"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

GET Get Account Asset Snapshot Page by Account ID

GET /api/v1/private/account/getAccountAssetSnapshotPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to retrieve. Must be greater than 0 and less than or equal to 1000

offsetData

query

string

No

Pagination offset. If empty or not provided, the first page is retrieved

coinId

query

string

Yes

Filter by the specified coin ID.

filterTimeTag

query

string

No

Specifies time tag. If not provided or 0, returns snapshots by the hour. 1 returns snapshots by the day

filterStartTimeInclusive

query

string

No

Filter snapshots created after or at the specified start time (inclusive). If not provided or 0, retrieves records from the earliest time

filterEndTimeExclusive

query

string

No

Filter snapshots created before the specified end time (exclusive). If not provided or 0, retrieves records up to the latest time

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "timeTag": 1,
                "snapshotTime": "1734652800000",
                "totalEquity": "16.000000",
                "termRealizePnl": "0",
                "unrealizePnl": "0",
                "totalRealizePnl": "0"
            },
            {
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "timeTag": 1,
                "snapshotTime": "1734566400000",
                "totalEquity": "16.000000",
                "termRealizePnl": "0",
                "unrealizePnl": "0",
                "totalRealizePnl": "0"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734663257066",
    "responseTime": "1734663257075",
    "traceId": "f52222cd41b6ff8bcd059a57ecd986a1"
}

Response

Status Code
Status Code Description
Description
Data Model

200

default response

Data Models

accountassetsnapshot

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Generic Paginated Response

errorParam

object

false

none

Error Parameters

Error message parameter information

» additionalProperties

string

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemapagedataaccountassetsnapshot

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

Data List

nextPageOffsetData

string

false

none

Next Page Offset

Offset for retrieving the next page. If no next page data, empty string.

schemaaccountassetsnapshot

Name
Type
Required
Constraints
Description
Notes

userId

string(int64)

false

none

User ID

ID of the owning user

accountId

string(int64)

false

none

Account ID

ID of the owning account

coinId

string(int64)

false

none

Collateral Coin ID

ID of the associated collateral coin

timeTag

integer(int32)

false

none

Time Tag

Time tag. 1 represents the snapshot time is for the whole day.

snapshotTime

string(int64)

false

none

Snapshot Time

Snapshot time, hourly timestamp at the top of the hour.

totalEquity

string

false

none

Total Collateral Value

Current total value of the collateral

termRealizePnl

string

false

none

Term Realized PnL

Realized PnL for the term

unrealizePnl

string

false

none

Unrealized PnL

Unrealized PnL

totalRealizePnl

string

false

none

Total Realized PnL

Total realized PnL of the position

schemaresultgetaccountasset

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Get Account Asset Response

Response structure for fetching account asset data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemagetaccountasset

Name
Type
Required
Constraints
Description
Notes

account

false

none

Account Information

Account information data.

collateralList

false

none

Collateral Information List

List of collateral information data.

positionList

false

none

Perpetual Contract Position List

List of perpetual contract position information.

version

string(int64)

false

none

Account Version

Account version number, incremented with each update.

positionAssetList

false

none

Position Asset Information List

List of position asset information.

collateralAssetModelList

false

none

Account-Level Asset Information List

List of account-level asset information.

oraclePriceList

false

none

Oracle Price List

List of all oracle prices used to calculate assets (only those used).

schemaindexprice

Name
Type
Required
Constraints
Description
Notes

contractId

string(int64)

false

none

Contract ID

Contract ID

priceType

string

false

none

Price Type

priceValue

string

false

none

Price Value

Price value

createdTime

string(int64)

false

none

Creation Time

Time of creation

oraclePriceSignature

false

none

Oracle Price Signature Information

Oracle price signature information, only exists when price_type=ORACLE_PRICE.

Enumerated Values

Property
Value

priceType

UNKNOWN_PRICE_TYPE

priceType

ORACLE_PRICE

priceType

INDEX_PRICE

priceType

LAST_PRICE

priceType

ASK1_PRICE

priceType

BID1_PRICE

priceType

OPEN_INTEREST

priceType

UNRECOGNIZED

schemaoraclepricesignature

Name
Type
Required
Constraints
Description
Notes

contractId

string(int64)

false

none

Contract ID

Contract ID

signer

string

false

none

Signer ID

Signer identifier

price

string

false

none

Signed Price

The price signed (price after stark ex precision processing)

externalAssetId

string

false

none

Concatenated Asset and Oracle Names

Concatenation of the asset name and the oracle name (both in hex encoding).

signature

false

none

L2 Signature Information

L2 signature information

timestamp

string(int64)

false

none

Signature Creation Time

The time the signature was created.

schemal2signature

Name
Type
Required
Constraints
Description
Notes

r

string

false

none

R Value

Bigint for hex string

s

string

false

none

S Value

Bigint for hex string

v

string

false

none

V Value

Bigint for hex string

schemacollateralasset

Name
Type
Required
Constraints
Description
Notes

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Collateral Coin ID

ID of the associated collateral coin.

totalEquity

string

false

none

Total Collateral Value

Current total value of the collateral.

totalPositionValueAbs

string

false

none

Sum of Absolute Position Values

Sum of the absolute position values for the current collateral

initialMarginRequirement

string

false

none

Initial Margin Requirement

The initial margin requirement for the current collateral.

starkExRiskValue

string

false

none

Total StarkEx Risk Value

The total starkEx risk amount for the current collateral.

pendingWithdrawAmount

string

false

none

Pending Withdrawal Amount

The amount of collateral pending withdrawal.

pendingTransferOutAmount

string

false

none

Pending Transfer Out Amount

The amount of collateral pending transfer out.

orderFrozenAmount

string

false

none

Order Frozen Amount

The amount of collateral frozen by orders.

availableAmount

string

false

none

Available Amount

The amount of collateral available for use.

schemapositionasset

Name
Type
Required
Constraints
Description
Notes

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Collateral Coin ID

ID of the associated collateral coin.

contractId

string(int64)

false

none

Contract ID

ID of the associated contract.

positionValue

string

false

none

Position Value

Position value, positive for long positions, negative for short positions.

maxLeverage

string

false

none

Maximum Leverage

The maximum leverage for current contract position.

initialMarginRequirement

string

false

none

Initial Margin Requirement

Initial margin requirement for the position.

starkExRiskRate

string

false

none

StarkEx Risk Rate

StarkEx risk rate calculated based on risk tiers. Similar to maintenance margin rate with different precision.

starkExRiskValue

string

false

none

StarkEx Risk Value

StarkEx risk amount, similar to maintenance margin, with different precision.

avgEntryPrice

string

false

none

Average Entry Price

Average entry price.

liquidatePrice

string

false

none

Liquidation Price

Liquidation price (force liquidation price). If oracle price reaches this price, liquidation is triggered.

bankruptPrice

string

false

none

Bankruptcy Price

Bankruptcy price. If the oracle price reaches this level, account total value is less than 0.

worstClosePrice

string

false

none

Worst Close Price

The worst closing price. The closing transaction price can not be worse than this price.

unrealizePnl

string

false

none

Unrealized PnL

Unrealized profit and loss for the position.

termRealizePnl

string

false

none

Term Realized PnL

Realized PnL for the term.

totalRealizePnl

string

false

none

Total Realized PnL

Total realized PnL of the position.

schemaposition

Name
Type
Required
Constraints
Description
Notes

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Collateral Coin ID

ID of the associated collateral coin.

contractId

string(int64)

false

none

Contract ID

ID of the associated contract.

openSize

string

false

none

Current Open Size

Current open size (positive for long, negative for short).

openValue

string

false

none

Current Open Value

Current open value (increases upon opening, proportionally decreases upon closing).

openFee

string

false

none

Current Open Fee

Current allocated open fee (increases upon opening, proportionally decreases upon closing).

fundingFee

string

false

none

Current Funding Fee

Current allocated funding fee (increases upon settlement, proportionally decreases upon closing).

longTermCount

integer(int32)

false

none

Long Position Term Count

Long position term count. Starts from 1, increases by one upon complete closure of a position

longTermStat

false

none

Long Position Cumulative Statistics

Cumulative statistics for the position.

longTermCreatedTime

string

false

none

Long Position Term Creation Time

Creation time for the long position term.

longTermUpdatedTime

string

false

none

Long Position Term Update Time

Update time for the long position term.

shortTermCount

integer(int32)

false

none

Short Position Term Count

Short position term count. Starts from 1, increases by one upon complete closure of a position

shortTermStat

false

none

Short Position Cumulative Statistics

Cumulative statistics for the position.

shortTermCreatedTime

string

false

none

Short Position Term Creation Time

Creation time for the short position term.

shortTermUpdatedTime

string

false

none

Short Position Term Update Time

Update time for the short position term.

longTotalStat

false

none

Long Cumulative Statistics

Cumulative statistics for the position.

shortTotalStat

false

none

Short Cumulative Statistics

Cumulative statistics for the position.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

schemapositionstat

Name
Type
Required
Constraints
Description
Notes

cumOpenSize

string

false

none

Cumulative Open Size

Cumulative open size.

cumOpenValue

string

false

none

Cumulative Open Value

Cumulative open value.

cumOpenFee

string

false

none

Cumulative Open Fee

Cumulative open fees.

cumCloseSize

string

false

none

Cumulative Close Size

Cumulative close size.

cumCloseValue

string

false

none

Cumulative Close Value

Cumulative close value.

cumCloseFee

string

false

none

Cumulative Close Fee

Cumulative close fees.

cumFundingFee

string

false

none

Cumulative Funding Fee

Cumulative funding fees settled.

cumLiquidateFee

string

false

none

Cumulative Liquidate Fee

Cumulative liquidation fees.

schemacollateral

Name
Type
Required
Constraints
Description
Notes

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Coin ID

Collateral coin ID.

amount

string(decimal)

false

none

Collateral Amount

Collateral amount, actually of decimal type.

legacyAmount

string(decimal)

false

none

Legacy Amount

Legacy balance field, for display purposes only, not for calculations.

cumDepositAmount

string(decimal)

false

none

Cumulative Deposit Amount

Cumulative deposit amount.

cumWithdrawAmount

string(decimal)

false

none

Cumulative Withdrawal Amount

Cumulative withdrawal amount.

cumTransferInAmount

string(decimal)

false

none

Cumulative Transfer In Amount

Cumulative transfer in amount.

cumTransferOutAmount

string(decimal)

false

none

Cumulative Transfer Out Amount

Cumulative transfer out amount.

cumPositionBuyAmount

string(decimal)

false

none

Cumulative Position Buy Amount

Cumulative collateral amount deducted from position buy.

cumPositionSellAmount

string(decimal)

false

none

Cumulative Position Sell Amount

Cumulative collateral amount added from position sell.

cumFillFeeAmount

string(decimal)

false

none

Cumulative Fill Fee Amount

Cumulative transaction fee amount.

cumFundingFeeAmount

string(decimal)

false

none

Cumulative Funding Fee Amount

Cumulative funding fee amount.

cumFillFeeIncomeAmount

string(decimal)

false

none

Cumulative Order Fill Fee Income Amount

Cumulative amount from order fill fee income.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

schemaaccount

Name
Type
Required
Constraints
Description
Notes

id

string(int64)

false

none

Account ID

Account ID, must be greater than 0.

userId

string(int64)

false

none

User ID

ID of the owning user.

ethAddress

string

false

none

Wallet ETH Address

Wallet ETH address.

l2Key

string

false

none

L2 Account Key

Account key on L2. Stark key in starkEx. Bigint for hex string

l2KeyYCoordinate

string

false

none

L2 Key Y Coordinate

Used only for verifying l2Signature. Not returned to end users. Bigint for hex string.

clientAccountId

string

false

none

Client Account ID

Client account ID for idempotency check.

isSystemAccount

boolean

false

none

System Account

Whether it is a system account (system accounts are not subject to contract risk settings, use separate MQ for trade messages).

defaultTradeSetting

false

none

Default Trade Setting

Trade settings. Trade setting calculation priority: Account contract trade settings -> Account default trade settings -> Contract configuration trade settings. Note: Only one of is_set_fee_rate and is_set_fee_discount can be true.

contractIdToTradeSetting

object

false

none

Contract-Level Account Trade Settings

Account contract-level trade settings.

» additionalProperties

false

none

Contract-Level Account Trade Settings

Trade settings. Trade setting calculation priority: Account contract trade settings -> Account default trade settings -> Contract configuration trade settings. Note: Only one of is_set_fee_rate and is_set_fee_discount can be true.

maxLeverageLimit

string

false

none

Maximum Leverage Limit

User-set maximum leverage limit. If 0, uses the leverage limit of the corresponding trading contract.

createOrderPerMinuteLimit

integer(int32)

false

none

Order Creation Limit per Minute

Order frequency limit per minute. If 0, default limit is used; if < 0, no limit is applied.

createOrderDelayMillis

integer(int32)

false

none

Order Creation Delay Milliseconds

Order delay milliseconds, must be greater than or equal to 0.

extraType

string

false

none

Extra Type

Extra type for upper-layer use.

extraDataJson

string

false

none

Extra Data

Extra data in JSON format, default is an empty string.

status

string

false

none

Account Status

Account status.

isLiquidating

boolean

false

none

Is Liquidating

Whether is being liquidated.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

Enumerated Values

Property
Value

status

UNKNOWN_ACCOUNT_STATUS

status

CENSORING

status

NORMAL

status

DISABLED

status

INVALID

status

UNRECOGNIZED

schematradesetting

Name
Type
Required
Constraints
Description
Notes

isSetFeeRate

boolean

false

none

Whether Fee Rate is Set

Whether to set a specific fee rate value.

takerFeeRate

string(decimal)

false

none

Taker Fee Rate

Taker fee rate, range [0, 1), valid only when is_set_fee_rate=true.

makerFeeRate

string(decimal)

false

none

Maker Fee Rate

Maker fee rate, range [0, 1), valid only when is_set_fee_rate=true.

isSetFeeDiscount

boolean

false

none

Whether Fee Discount is Set

Whether to set a fee discount.

takerFeeDiscount

string(decimal)

false

none

Taker Fee Discount

Taker fee discount, range [0, 1), valid only when is_set_fee_discount=true.

makerFeeDiscount

string(decimal)

false

none

Maker Fee Discount

Maker fee discount, range [0, 1), valid only when is_set_fee_discount=true.

isSetMaxLeverage

boolean

false

none

Whether Maximum Leverage is Set

Whether to set maximum trading leverage.

maxLeverage

string(decimal)

false

none

Maximum Leverage

Maximum trading leverage.

schemaresultaccount

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Account Information

Account information data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

getaccountdeleveragelight

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Get Account Deleverage Light Response

Response structure for fetching deleverage light information.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

Response structure for fetching deleverage light information.

Name
Type
Required
Constraints
Description
Notes

positionContractIdToLightNumberMap

object

false

none

Map from Position Contract ID to Light Number

Maps position contract ID to light number. light_number ranges from 1-5, which represent 1-5 lights.

account

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Generic Paginated Response

Generic paginated response.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

Generic Paginated Response

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

Data List

List of account data.

nextPageOffsetData

string

false

none

Next Page Offset

Offset for retrieving the next page. If no next page data, empty string.

collateral

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Response Data

Correct response data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

collateraltransaction

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Response Data

Correct response data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

Collateral transaction details

Name
Type
Required
Constraints
Description
Notes

id

string(int64)

false

none

Unique Identifier

Unique identifier.

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Coin ID

Collateral coin ID.

type

string

false

none

Detail Type

Detail type.

deltaAmount

string(decimal)

false

none

Collateral Change Amount

Amount of the collateral change.

deltaLegacyAmount

string(decimal)

false

none

Legacy Balance Change Amount

Change amount of the legacy balance field.

beforeAmount

string(decimal)

false

none

Collateral Amount Before Change

Collateral amount before the change.

beforeLegacyAmount

string(decimal)

false

none

Legacy Balance Amount Before Change

Legacy balance before the change.

fillCloseSize

string(decimal)

false

none

Transaction Close Size

Transaction close size (positive for buy, negative for sell).

fillCloseValue

string

false

none

Transaction Close Value

Transaction close value (positive for buy, negative for sell).

fillCloseFee

string

false

none

Transaction Close Fee

Transaction close fee (typically zero or negative).

fillOpenSize

string(decimal)

false

none

Transaction Open Size

Transaction open size (positive for buy, negative for sell).

fillOpenValue

string

false

none

Transaction Open Value

Transaction open value (positive for buy, negative for sell).

fillOpenFee

string

false

none

Transaction Open Fee

Transaction open fee (typically zero or negative).

fillPrice

string(decimal)

false

none

Transaction Price

Transaction price (not precise, for display).

liquidateFee

string(decimal)

false

none

Liquidation Fee

Liquidation fee (if close transaction is a liquidation, typically zero or negative).

realizePnl

string(decimal)

false

none

Realized Profit and Loss

Realized profit and loss from a close (if a close transaction. Not precise, for display).

isLiquidate

boolean

false

none

Is Liquidation

Whether the transaction is a liquidation.

isDeleverage

boolean

false

none

Is Auto-Deleveraging

Whether the transaction is from auto-deleveraging.

fundingTime

string(int64)

false

none

Funding Settlement Time

Funding settlement time.

fundingRate

string(decimal)

false

none

Funding Rate

Funding rate.

fundingIndexPrice

string(decimal)

false

none

Funding Index Price

Index price related to funding rate.

fundingOraclePrice

string(decimal)

false

none

Funding Oracle Price

Oracle price related to funding rate.

fundingPositionSize

string(decimal)

false

none

Position Size During Funding Settlement

Position size during funding settlement (positive for long, negative for short).

depositId

string(int64)

false

none

Deposit Order ID

Associated deposit order ID when type=DEPOSIT.

withdrawId

string(int64)

false

none

Withdrawal Order ID

Associated withdrawal order ID when type=WITHDRAW.

transferInId

string(int64)

false

none

Transfer In Order ID

Associated transfer-in order ID when type=TRANSFER_IN.

transferOutId

string(int64)

false

none

Transfer Out Order ID

Associated transfer-out order ID when type=TRANSFER_OUT.

transferReason

string

false

none

Transfer Reason

Transfer reason when type=TRANSFER_IN/TRANSFER_OUT.

orderId

string(int64)

false

none

Order ID

Associated order ID when type=POSITION_BUY/POSITION_SELL/FILL_FEE_INCOME.

orderFillTransactionId

string(int64)

false

none

Order Fill Transaction ID

Associated order fill transaction ID when type=POSITION_BUY/POSITION_SELL/FILL_FEE_INCOME.

orderAccountId

string(int64)

false

none

Order Account ID

Associated order account ID when type=FILL_FEE_INCOME.

positionContractId

string(int64)

false

none

Position Contract ID

Associated position contract ID when type=POSITION_BUY/POSITION_SELL/POSITION_FUNDING/FILL_FEE_INCOME.

positionTransactionId

string(int64)

false

none

Position Transaction ID

Associated position transaction ID when type=POSITION_BUY/POSITION_SELL/POSITION_FUNDING.

forceWithdrawId

string

false

none

Force Withdrawal Order ID

Associated force withdrawal order ID when type=WITHDRAW.

forceTradeId

string

false

none

Force Trade ID

Associated force trade order ID when type=POSITION_BUY/POSITION_SELL.

extraType

string

false

none

Extra Type

Extra type for upper-layer business use.

extraDataJson

string

false

none

Extra Data

Extra data in JSON format, default is empty string.

censorStatus

string

false

none

Current Censoring Status

Current censoring status.

censorTxId

string(int64)

false

none

Censoring Processing Sequence Number

Censoring processing sequence number, exists when censor_status=CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorTime

string(int64)

false

none

Censoring Processing Time

Censoring processing time, exists when censor_status=CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorFailCode

string

false

none

Censoring Failure Code

Censoring failure code, exists when censor_status=CENSOR_FAILURE.

censorFailReason

string

false

none

Censoring Failure Reason

Censoring failure reason, exists when censor_status=CENSOR_FAILURE.

l2TxId

string(int64)

false

none

L2 Push Transaction ID

L2 push transaction ID, exists when censor_status=CENSOR_SUCCESS/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

l2RejectTime

string(int64)

false

none

L2 Rejection Time

L2 rejection time, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2RejectCode

string

false

none

L2 Rejection Error Code

L2 rejection error code, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2RejectReason

string

false

none

L2 Rejection Reason

L2 rejection reason, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2ApprovedTime

string(int64)

false

none

L2 Batch Verification Time

L2 batch verification time, exists when censor_status=L2_APPROVED/L2_REJECT_APPROVED.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

Enumerated Values

Property
Value

type

UNKNOWN_COLLATERAL_TRANSACTION_TYPE

type

DEPOSIT

type

WITHDRAW

type

TRANSFER_IN

type

TRANSFER_OUT

type

POSITION_BUY

type

POSITION_SELL

type

POSITION_FUNDING

type

FILL_FEE_INCOME

type

BUG_FIX_COLLATERAL_TRANSACTION_TYPE

type

UNRECOGNIZED

transferReason

UNKNOWN_TRANSFER_REASON

transferReason

USER_TRANSFER

transferReason

FAST_WITHDRAW

transferReason

CROSS_DEPOSIT

transferReason

CROSS_WITHDRAW

transferReason

UNRECOGNIZED

censorStatus

UNKNOWN_TRANSACTION_STATUS

censorStatus

INIT

censorStatus

CENSOR_SUCCESS

censorStatus

CENSOR_FAILURE

censorStatus

L2_APPROVED

censorStatus

L2_REJECT

censorStatus

L2_REJECT_APPROVED

censorStatus

UNRECOGNIZED

collateraltransaction

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Generic Paginated Response

Generic paginated response.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemapagedatacollateraltransaction

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

Data List

List of collateral transaction data.

nextPageOffsetData

string

false

none

Next Page Offset

Offset for retrieving the next page. If no next page data, empty string.

position

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Response Data

Correct response data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

positionterm

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Generic Paginated Response

Generic paginated response.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemapagedatapositionterm

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

Data List

List of position term data.

nextPageOffsetData

string

false

none

Next Page Offset

Offset for retrieving the next page. If no next page data, empty string.

schemapositionterm

Name
Type
Required
Constraints
Description
Notes

userId

string

false

none

User ID

ID of the owning user.

accountId

string

false

none

Account ID

ID of the owning account.

coinId

string

false

none

Collateral Coin ID

ID of the associated collateral coin.

contractId

string

false

none

Contract ID

ID of the associated contract.

termCount

integer(int32)

false

none

Term Count

Term count. Starts from 1, increases by one each time a position is fully closed and then re-opened.

cumOpenSize

string

false

none

Cumulative Open Size

Cumulative open size.

cumOpenValue

string

false

none

Cumulative Open Value

Cumulative open value.

cumOpenFee

string

false

none

Cumulative Open Fee

Cumulative open fees.

cumCloseSize

string

false

none

Cumulative Close Size

Cumulative close size.

cumCloseValue

string

false

none

Cumulative Close Value

Cumulative close value.

cumCloseFee

string

false

none

Cumulative Close Fee

Cumulative close fees.

cumFundingFee

string

false

none

Cumulative Funding Fee

Cumulative funding fees that have been settled.

cumLiquidateFee

string

false

none

Cumulative Liquidation Fee

Cumulative liquidation fees.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

currentLeverage

string

false

none

Leverage at Close

Leverage multiple at the time of close position.

positiontransaction

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Response Data

Correct response data.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemapositiontransaction

Name
Type
Required
Constraints
Description
Notes

id

string(int64)

false

none

Unique Identifier

Unique identifier.

userId

string(int64)

false

none

User ID

ID of the owning user.

accountId

string(int64)

false

none

Account ID

ID of the owning account.

coinId

string(int64)

false

none

Collateral Coin ID

ID of the associated collateral coin.

contractId

string(int64)

false

none

Contract ID

ID of the associated contract.

type

string

false

none

Detail Type

Detail type.

deltaOpenSize

string

false

none

Change in Open Size

Change in holding size.

deltaOpenValue

string

false

none

Change in Open Value

Change in open value.

deltaOpenFee

string

false

none

Change in Open Fee

Change in open fee.

deltaFundingFee

string

false

none

Change in Funding Fee

Change in funding fee.

beforeOpenSize

string

false

none

Open Size Before Change

Holding size before the change.

beforeOpenValue

string

false

none

Open Value Before Change

Open value before the change.

beforeOpenFee

string

false

none

Open Fee Before Change

Open fee before the change.

beforeFundingFee

string

false

none

Funding Fee Before Change

Funding fee before the change.

fillCloseSize

string

false

none

Transaction Close Size

Transaction close size (positive for buy, negative for sell).

fillCloseValue

string

false

none

Transaction Close Value

Transaction close value (positive for buy, negative for sell).

fillCloseFee

string

false

none

Transaction Close Fee

Transaction close fee (typically zero or negative).

fillOpenSize

string

false

none

Transaction Open Size

Transaction open size (positive for buy, negative for sell).

fillOpenValue

string

false

none

Transaction Open Value

Transaction open value (positive for buy, negative for sell).

fillOpenFee

string

false

none

Transaction Open Fee

Transaction open fee (typically zero or negative).

fillPrice

string

false

none

Transaction Price

Transaction price (not precise, for display).

liquidateFee

string

false

none

Liquidation Fee

Liquidation fee (if close transaction is a liquidation, typically zero or negative).

realizePnl

string

false

none

Realized Profit and Loss

Realized profit and loss from a close (if a close transaction. Not precise, for display).

isLiquidate

boolean

false

none

Is Liquidation

Whether the transaction is a liquidation.

isDeleverage

boolean

false

none

Is Auto-Deleveraging

Whether the transaction is from auto-deleveraging.

fundingTime

string(int64)

false

none

Funding Settlement Time

Funding settlement time.

fundingRate

string

false

none

Funding Rate

Funding rate.

fundingIndexPrice

string

false

none

Funding Index Price

Index price related to funding rate.

fundingOraclePrice

string

false

none

Funding Oracle Price

Oracle price related to funding rate.

fundingPositionSize

string

false

none

Position Size During Funding Settlement

Position size during funding settlement (positive for long, negative for short).

orderId

string(int64)

false

none

Order ID

Associated order ID.

orderFillTransactionId

string(int64)

false

none

Order Fill Transaction ID

Associated order fill transaction ID.

collateralTransactionId

string(int64)

false

none

Collateral Transaction ID

Associated collateral transaction detail ID.

forceTradeId

string

false

none

Force Trade ID

Associated force trade order ID.

extraType

string

false

none

Extra Type

Extra type for upper-layer business use.

extraDataJson

string

false

none

Extra Data

Extra data in JSON format, default is empty string.

censorStatus

string

false

none

Current Censoring Status

Current censoring status.

censorTxId

string(int64)

false

none

Censoring Processing Sequence Number

Censoring processing sequence number, exists when censor_status=CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorTime

string(int64)

false

none

Censoring Processing Time

Censoring processing time, exists when censor_status=CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorFailCode

string

false

none

Censoring Failure Code

Censoring failure code, exists when censor_status=CENSOR_FAILURE.

censorFailReason

string

false

none

Censoring Failure Reason

Censoring failure reason, exists when censor_status=CENSOR_FAILURE.

l2TxId

string(int64)

false

none

L2 Push Transaction ID

L2 push transaction ID, exists when censor_status=CENSOR_SUCCESS/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

l2RejectTime

string(int64)

false

none

L2 Rejection Time

L2 rejection time, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2RejectCode

string

false

none

L2 Rejection Error Code

L2 rejection error code, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2RejectReason

string

false

none

L2 Rejection Reason

L2 rejection reason, exists when censor_status=L2_REJECT/L2_REJECT_APPROVED.

l2ApprovedTime

string(int64)

false

none

L2 Batch Verification Time

L2 batch verification time, exists when censor_status=L2_APPROVED/L2_REJECT_APPROVED.

createdTime

string(int64)

false

none

Creation Time

Creation time.

updatedTime

string(int64)

false

none

Update Time

Update time.

Enumerated Values

Property
Value

type

UNKNOWN_POSITION_TRANSACTION_TYPE

type

BUY_POSITION

type

SELL_POSITION

type

SETTLE_FUNDING_FEE

type

BUG_FIX_POSITION_TRANSACTION_TYPE

type

UNRECOGNIZED

censorStatus

UNKNOWN_TRANSACTION_STATUS

censorStatus

INIT

censorStatus

CENSOR_SUCCESS

censorStatus

CENSOR_FAILURE

censorStatus

L2_APPROVED

censorStatus

L2_REJECT

censorStatus

L2_REJECT_APPROVED

censorStatus

UNRECOGNIZED

positiontransactionpage

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status Code

Returns "SUCCESS" on success; otherwise, it indicates failure.

data

false

none

Generic Paginated Response

Generic paginated response.

errorParam

object

false

none

Error Parameters

Error message parameter information

requestTime

string(timestamp)

false

none

Server Request Time

Time at which the server received the request

responseTime

string(timestamp)

false

none

Server Response Time

Time at which the server sent the response

traceId

string

false

none

Trace ID

Invocation trace ID

schemapagedatapositiontransaction

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

Data List

List of position transaction data.

nextPageOffsetData

string

false

none

Next Page Offset

Offset for retrieving the next page. If no next page data, empty string.

Last updated

Order API | edgeX Docs

Order API

OrderPrivateApi

POST Get Maximum Order Creation Size

POST /api/v1/private/order/getMaxCreateOrderSize

Body Request Parameters

{
  "accountId": "551109015904453258",
  "contractId": "10000001",
  "price": "97,463.4"
}

Request Parameters

Name
Location
Type
Required
Description

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "maxBuySize": "0.004",
        "maxSellSize": "0.009",
        "ask1Price": "97532.1",
        "bid1Price": "97496.1"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734665285662",
    "responseTime": "1734665285679",
    "traceId": "38fc6d0f57f3e64c8c6239fae7d35f84"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

POST Create Order

POST /api/v1/private/order/createOrder

Body Request Parameters

{
    "price": "97393.8",
    "size": "0.001",
    "type": "LIMIT",
    "timeInForce": "GOOD_TIL_CANCEL",
    "reduceOnly": false,
    "isPositionTpsl": false,
    "isSetOpenTp": false,
    "isSetOpenSl": false,
    "accountId": "543429922991899150",
    "contractId": "10000001",
    "side": "BUY",
    "triggerPrice": "",
    "triggerPriceType": "LAST_PRICE",
    "clientOrderId": "21163368294502694",
    "expireTime": "1736476772359",
    "l2Nonce": "808219",
    "l2Value": "97.3938",
    "l2Size": "0.001",
    "l2LimitFee": "0.048697",
    "l2ExpireTime": "1737254372359",
    "l2Signature": "0537b3051bb9ffb98bb842ff6cadf69807a8dbf74f94d8c6106cf4f59b1fd2dc01aa2d93420408d60298831ddb82f7b482574ecb0fc285294dfeec732379ec40",
    "extraType": "",
    "extraDataJson": "",
    "symbol": "BTCUSDT",
    "showEqualValInput": true,
    "maxSellQTY": 0.009,
    "maxBuyQTY": 0.007
}

Request Parameters

Name
Location
Type
Required
Description

body

body

No

none

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "orderId": "564814927928230158"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734662372560",
    "responseTime": "1734662372575",
    "traceId": "364c0020d1fe90bbfcca3cf3a9d54759"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Response Data Structure

POST Cancel Order by Order ID

POST /api/v1/private/order/cancelOrderById

Body Request Parameters

{
    "accountId": "551109015904453258",
    "orderIdList": [
        "564827797948727434"
    ]
}

Request Parameters

Name
Location
Type
Required
Description

body

body

No

none

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "cancelResultMap": {
            "564827797948727434": "SUCCESS"
        }
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734665453034",
    "responseTime": "1734665453043",
    "traceId": "5597699fd044ed965bfed23fb3728ba5"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

POST Cancel All Orders under Account

POST /api/v1/private/order/cancelAllOrder

Body Request Parameters

{
    "accountId": "551109015904453258"
}

Request Parameters

Name
Location
Type
Required
Description

body

body

No

none

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "cancelResultMap": {
            "564828209955209354": "SUCCESS"
        }
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734665771719",
    "responseTime": "1734665771743",
    "traceId": "c0a1da9b75ad55d64ce0e98f86279c34"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Inline

Response Data Structure

GET Get Orders by Account ID and Order IDs (Batch)

GET /api/v1/private/order/getOrderById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

orderIdList

query

string

No

Order IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564829588270612618",
            "userId": "543429922866069763",
            "accountId": "551109015904453258",
            "coinId": "1000",
            "contractId": "10000001",
            "side": "BUY",
            "price": "96260.7",
            "size": "0.001",
            "clientOrderId": "9311381563209122",
            "type": "LIMIT",
            "timeInForce": "GOOD_TIL_CANCEL",
            "reduceOnly": false,
            "triggerPrice": "0",
            "triggerPriceType": "UNKNOWN_PRICE_TYPE",
            "expireTime": "1736480267612",
            "sourceKey": "",
            "isPositionTpsl": false,
            "isLiquidate": false,
            "isDeleverage": false,
            "openTpslParentOrderId": "0",
            "isSetOpenTp": false,
            "openTp": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isSetOpenSl": false,
            "openSl": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isWithoutMatch": false,
            "withoutMatchFillSize": "0",
            "withoutMatchFillValue": "0",
            "withoutMatchPeerAccountId": "0",
            "withoutMatchPeerOrderId": "0",
            "maxLeverage": "50",
            "takerFeeRate": "0.000500",
            "makerFeeRate": "0.000180",
            "liquidateFeeRate": "0.01",
            "marketLimitPrice": "0",
            "marketLimitValue": "0",
            "l2Nonce": "3353661024",
            "l2Value": "96.260700",
            "l2Size": "0.001",
            "l2LimitFee": "0.048131",
            "l2ExpireTime": "1737257867612",
            "l2Signature": {
                "r": "0x072f299b86c199e161508ed554889d50476bc96d5a0c320bcd5b7e579b692c06",
                "s": "0x05b24b988f84bca951b3bb4e69b11e0aa1ce08cca38fea0f3afd94b5e7cd09f8",
                "v": ""
            },
            "extraType": "",
            "extraDataJson": "",
            "status": "OPEN",
            "matchSequenceId": "35229771",
            "triggerTime": "0",
            "triggerPriceTime": "0",
            "triggerPriceValue": "0",
            "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
            "cumFillSize": "0",
            "cumFillValue": "0",
            "cumFillFee": "0",
            "maxFillPrice": "0",
            "minFillPrice": "0",
            "cumLiquidateFee": "0",
            "cumRealizePnl": "0",
            "cumMatchSize": "0",
            "cumMatchValue": "0",
            "cumMatchFee": "0",
            "cumFailSize": "0",
            "cumFailValue": "0",
            "cumFailFee": "0",
            "cumApprovedSize": "0",
            "cumApprovedValue": "0",
            "cumApprovedFee": "0",
            "createdTime": "1734665867870",
            "updatedTime": "1734665867876"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734665901264",
    "responseTime": "1734665901281",
    "traceId": "65ca2097b4d9cfb487bd9cef53097040"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Inline

Response Data Structure

GET Get Orders by Client Order IDs (Batch)

GET /api/v1/private/order/getOrderByClientOrderId

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

clientOrderIdList

query

string

No

Client-defined order IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564829588270612618",
            "userId": "543429922866069763",
            "accountId": "551109015904453258",
            "coinId": "1000",
            "contractId": "10000001",
            "side": "BUY",
            "price": "96260.7",
            "size": "0.001",
            "clientOrderId": "9311381563209122",
            "type": "LIMIT",
            "timeInForce": "GOOD_TIL_CANCEL",
            "reduceOnly": false,
            "triggerPrice": "0",
            "triggerPriceType": "UNKNOWN_PRICE_TYPE",
            "expireTime": "1736480267612",
            "sourceKey": "",
            "isPositionTpsl": false,
            "isLiquidate": false,
            "isDeleverage": false,
            "openTpslParentOrderId": "0",
            "isSetOpenTp": false,
            "openTp": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isSetOpenSl": false,
            "openSl": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isWithoutMatch": false,
            "withoutMatchFillSize": "0",
            "withoutMatchFillValue": "0",
            "withoutMatchPeerAccountId": "0",
            "withoutMatchPeerOrderId": "0",
            "maxLeverage": "50",
            "takerFeeRate": "0.000500",
            "makerFeeRate": "0.000180",
            "liquidateFeeRate": "0.01",
            "marketLimitPrice": "0",
            "marketLimitValue": "0",
            "l2Nonce": "3353661024",
            "l2Value": "96.260700",
            "l2Size": "0.001",
            "l2LimitFee": "0.048131",
            "l2ExpireTime": "1737257867612",
            "l2Signature": {
                "r": "0x072f299b86c199e161508ed554889d50476bc96d5a0c320bcd5b7e579b692c06",
                "s": "0x05b24b988f84bca951b3bb4e69b11e0aa1ce08cca38fea0f3afd94b5e7cd09f8",
                "v": ""
            },
            "extraType": "",
            "extraDataJson": "",
            "status": "OPEN",
            "matchSequenceId": "35229771",
            "triggerTime": "0",
            "triggerPriceTime": "0",
            "triggerPriceValue": "0",
            "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
            "cumFillSize": "0",
            "cumFillValue": "0",
            "cumFillFee": "0",
            "maxFillPrice": "0",
            "minFillPrice": "0",
            "cumLiquidateFee": "0",
            "cumRealizePnl": "0",
            "cumMatchSize": "0",
            "cumMatchValue": "0",
            "cumMatchFee": "0",
            "cumFailSize": "0",
            "cumFailValue": "0",
            "cumFailFee": "0",
            "cumApprovedSize": "0",
            "cumApprovedValue": "0",
            "cumApprovedFee": "0",
            "createdTime": "1734665867870",
            "updatedTime": "1734665867876"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734665947238",
    "responseTime": "1734665947256",
    "traceId": "64913ab9c62058bc2d9edaeafc3da271"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Inline

GET Get Historical Orders (Paginated)

GET /api/v1/private/order/getHistoryOrderPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to fetch. Must be greater than 0 and less than or equal to 100.

offsetData

query

string

No

Pagination offset. If not provided or empty, retrieves the first page.

filterCoinIdList

query

string

No

Filters by collateral coin IDs. If empty, fetches orders for all collateral coin IDs.

filterContractIdList

query

string

No

Filters by contract IDs. If empty, fetches orders for all contracts.

filterTypeList

query

string

No

Filters by order types. If empty, fetches orders of all types.

filterStatusList

query

string

No

Filters by order status. If empty, fetches orders of all statuses.

filterIsLiquidateList

query

string

No

Filters by liquidate orders. If empty, fetches all orders

filterIsDeleverageList

query

string

No

Filters by deleverage orders. If empty, fetches all orders

filterIsPositionTpslList

query

string

No

Filters by position TP/SL orders. If empty, fetches all orders

filterStartCreatedTimeInclusive

query

string

No

Filters orders created after or on this time (inclusive). If empty or 0, retrieves from the earliest.

filterEndCreatedTimeExclusive

query

string

No

Filters orders created before this time (exclusive). If empty or 0, retrieves to the latest.

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564815695875932430",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "side": "BUY",
                "price": "97444.5",
                "size": "0.001",
                "clientOrderId": "553364074986685",
                "type": "LIMIT",
                "timeInForce": "GOOD_TIL_CANCEL",
                "reduceOnly": false,
                "triggerPrice": "0",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "1736476955478",
                "sourceKey": "",
                "isPositionTpsl": false,
                "isLiquidate": false,
                "isDeleverage": false,
                "openTpslParentOrderId": "0",
                "isSetOpenTp": false,
                "openTp": {
                    "side": "UNKNOWN_ORDER_SIDE",
                    "price": "",
                    "size": "",
                    "clientOrderId": "",
                    "triggerPrice": "",
                    "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                    "expireTime": "0",
                    "l2Nonce": "0",
                    "l2Value": "",
                    "l2Size": "",
                    "l2LimitFee": "",
                    "l2ExpireTime": "0",
                    "l2Signature": {
                        "r": "",
                        "s": "",
                        "v": ""
                    }
                },
                "isSetOpenSl": false,
                "openSl": {
                    "side": "UNKNOWN_ORDER_SIDE",
                    "price": "",
                    "size": "",
                    "clientOrderId": "",
                    "triggerPrice": "",
                    "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                    "expireTime": "0",
                    "l2Nonce": "0",
                    "l2Value": "",
                    "l2Size": "",
                    "l2LimitFee": "",
                    "l2ExpireTime": "0",
                    "l2Signature": {
                        "r": "",
                        "s": "",
                        "v": ""
                    }
                },
                "isWithoutMatch": false,
                "withoutMatchFillSize": "0",
                "withoutMatchFillValue": "0",
                "withoutMatchPeerAccountId": "0",
                "withoutMatchPeerOrderId": "0",
                "maxLeverage": "50",
                "takerFeeRate": "0.000500",
                "makerFeeRate": "0.000180",
                "liquidateFeeRate": "0.01",
                "marketLimitPrice": "0",
                "marketLimitValue": "0",
                "l2Nonce": "2054491946",
                "l2Value": "97.444500",
                "l2Size": "0.001",
                "l2LimitFee": "0.048723",
                "l2ExpireTime": "1737254555478",
                "l2Signature": {
                    "r": "0x009af59c2963f1650449904fde059a83fed5beb4acdd67ffa22c551c4be977de",
                    "s": "0x04940a395f2d1b39c0f2b969e47fec478fbfea9ce227bfedd07d407175dcac3e",
                    "v": ""
                },
                "extraType": "",
                "extraDataJson": "",
                "status": "FILLED",
                "matchSequenceId": "35196430",
                "triggerTime": "0",
                "triggerPriceTime": "0",
                "triggerPriceValue": "0",
                "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
                "cumFillSize": "0.001",
                "cumFillValue": "97.4445",
                "cumFillFee": "0.017540",
                "maxFillPrice": "97444.5",
                "minFillPrice": "97444.5",
                "cumLiquidateFee": "0",
                "cumRealizePnl": "-0.017540",
                "cumMatchSize": "0.001",
                "cumMatchValue": "97.4445",
                "cumMatchFee": "0.017540",
                "cumFailSize": "0",
                "cumFailValue": "0",
                "cumFailFee": "0",
                "cumApprovedSize": "0",
                "cumApprovedValue": "0",
                "cumApprovedFee": "0",
                "createdTime": "1734662555665",
                "updatedTime": "1734662617992"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734662697584",
    "responseTime": "1734662697601",
    "traceId": "1cd03694d7da308cb13603f34b0836e6"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

GET Get Historical Order Fill Transactions (Paginated)

GET /api/v1/private/order/getHistoryOrderFillTransactionPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to fetch. Must be greater than 0 and less than or equal to 100.

offsetData

query

string

No

Pagination offset. If not provided or empty, retrieves the first page.

filterCoinIdList

query

string

No

Filters by collateral coin IDs. If empty, fetches order fill transactions for all collateral coin IDs.

filterContractIdList

query

string

No

Filters by contract IDs. If empty, fetches order fill transactions for all contracts.

filterOrderIdList

query

string

No

Filters by order IDs. If empty, fetches order fill transactions for all orders.

filterIsLiquidateList

query

string

No

Filters by liquidate orders. If empty, fetches all orders

filterIsDeleverageList

query

string

No

Filters by deleverage orders. If empty, fetches all orders

filterIsPositionTpslList

query

string

No

Filters by position TP/SL orders. If empty, fetches all orders

filterStartCreatedTimeInclusive

query

string

No

Filters order fill transactions created after or on this time (inclusive). If empty or 0, retrieves from the earliest.

filterEndCreatedTimeExclusive

query

string

No

Filters order fill transactions created before this time (exclusive). If empty or 0, retrieves to the latest.

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564815957260763406",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "orderId": "564815695875932430",
                "orderSide": "BUY",
                "fillSize": "0.001",
                "fillValue": "97.4445",
                "fillFee": "0.017540",
                "fillPrice": "97444.5",
                "liquidateFee": "0",
                "realizePnl": "-0.017540",
                "direction": "MAKER",
                "isPositionTpsl": false,
                "isLiquidate": false,
                "isDeleverage": false,
                "isWithoutMatch": false,
                "matchSequenceId": "35196430",
                "matchIndex": 0,
                "matchTime": "1734662617982",
                "matchAccountId": "555790606509539863",
                "matchOrderId": "564815957235597591",
                "matchFillId": "05d14491-db7d-478a-9d9f-2dc55c3ff3ca",
                "positionTransactionId": "564815957294318862",
                "collateralTransactionId": "564815957294317838",
                "extraType": "",
                "extraDataJson": "",
                "censorStatus": "CENSOR_SUCCESS",
                "censorTxId": "893031",
                "censorTime": "1734662617988",
                "censorFailCode": "",
                "censorFailReason": "",
                "l2TxId": "1084582",
                "l2RejectTime": "0",
                "l2RejectCode": "",
                "l2RejectReason": "",
                "l2ApprovedTime": "0",
                "createdTime": "1734662617984",
                "updatedTime": "1734662617992"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734662681040",
    "responseTime": "1734662681051",
    "traceId": "770fcce6222c2d88b65b4ecb36e84c43"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

GET Get Historical Order Fill Transactions by ID (Batch)

GET /api/v1/private/order/getHistoryOrderFillTransactionById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

orderFillTransactionIdList

query

string

No

Order fill transaction IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564815957260763406",
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "contractId": "10000001",
            "orderId": "564815695875932430",
            "orderSide": "BUY",
            "fillSize": "0.001",
            "fillValue": "97.4445",
            "fillFee": "0.017540",
            "fillPrice": "97444.5",
            "liquidateFee": "0",
            "realizePnl": "-0.017540",
            "direction": "MAKER",
            "isPositionTpsl": false,
            "isLiquidate": false,
            "isDeleverage": false,
            "isWithoutMatch": false,
            "matchSequenceId": "35196430",
            "matchIndex": 0,
            "matchTime": "1734662617982",
            "matchAccountId": "555790606509539863",
            "matchOrderId": "564815957235597591",
            "matchFillId": "05d14491-db7d-478a-9d9f-2dc55c3ff3ca",
            "positionTransactionId": "564815957294318862",
            "collateralTransactionId": "564815957294317838",
            "extraType": "",
            "extraDataJson": "",
            "censorStatus": "CENSOR_SUCCESS",
            "censorTxId": "893031",
            "censorTime": "1734662617988",
            "censorFailCode": "",
            "censorFailReason": "",
            "l2TxId": "1084582",
            "l2RejectTime": "0",
            "l2RejectCode": "",
            "l2RejectReason": "",
            "l2ApprovedTime": "0",
            "createdTime": "1734662617984",
            "updatedTime": "1734662617992"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734666041607",
    "responseTime": "1734666041619",
    "traceId": "629acb9f32074715a1ea9befd171c452"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

GET Get Historical Orders by ID (Batch)

GET /api/v1/private/order/getHistoryOrderById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

orderIdList

query

string

No

Order IDs

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564815695875932430",
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "contractId": "10000001",
            "side": "BUY",
            "price": "97444.5",
            "size": "0.001",
            "clientOrderId": "553364074986685",
            "type": "LIMIT",
            "timeInForce": "GOOD_TIL_CANCEL",
            "reduceOnly": false,
            "triggerPrice": "0",
            "triggerPriceType": "UNKNOWN_PRICE_TYPE",
            "expireTime": "1736476955478",
            "sourceKey": "",
            "isPositionTpsl": false,
            "isLiquidate": false,
            "isDeleverage": false,
            "openTpslParentOrderId": "0",
            "isSetOpenTp": false,
            "openTp": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isSetOpenSl": false,
            "openSl": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isWithoutMatch": false,
            "withoutMatchFillSize": "0",
            "withoutMatchFillValue": "0",
            "withoutMatchPeerAccountId": "0",
            "withoutMatchPeerOrderId": "0",
            "maxLeverage": "50",
            "takerFeeRate": "0.000500",
            "makerFeeRate": "0.000180",
            "liquidateFeeRate": "0.01",
            "marketLimitPrice": "0",
            "marketLimitValue": "0",
            "l2Nonce": "2054491946",
            "l2Value": "97.444500",
            "l2Size": "0.001",
            "l2LimitFee": "0.048723",
            "l2ExpireTime": "1737254555478",
            "l2Signature": {
                "r": "0x009af59c2963f1650449904fde059a83fed5beb4acdd67ffa22c551c4be977de",
                "s": "0x04940a395f2d1b39c0f2b969e47fec478fbfea9ce227bfedd07d407175dcac3e",
                "v": ""
            },
            "extraType": "",
            "extraDataJson": "",
            "status": "FILLED",
            "matchSequenceId": "35196430",
            "triggerTime": "0",
            "triggerPriceTime": "0",
            "triggerPriceValue": "0",
            "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
            "cumFillSize": "0.001",
            "cumFillValue": "97.4445",
            "cumFillFee": "0.017540",
            "maxFillPrice": "97444.5",
            "minFillPrice": "97444.5",
            "cumLiquidateFee": "0",
            "cumRealizePnl": "-0.017540",
            "cumMatchSize": "0.001",
            "cumMatchValue": "97.4445",
            "cumMatchFee": "0.017540",
            "cumFailSize": "0",
            "cumFailValue": "0",
            "cumFailFee": "0",
            "cumApprovedSize": "0",
            "cumApprovedValue": "0",
            "cumApprovedFee": "0",
            "createdTime": "1734662555665",
            "updatedTime": "1734662617992"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734666077826",
    "responseTime": "1734666077846",
    "traceId": "5773d3492c5913ba4f8c93071f3e426e"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Response Data Structure

GET Get Historical Orders by Client Order IDs (Batch)

GET /api/v1/private/order/getHistoryOrderByClientOrderId

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

clientOrderIdList

query

string

No

Order client order id

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564815695875932430",
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "contractId": "10000001",
            "side": "BUY",
            "price": "97444.5",
            "size": "0.001",
            "clientOrderId": "553364074986685",
            "type": "LIMIT",
            "timeInForce": "GOOD_TIL_CANCEL",
            "reduceOnly": false,
            "triggerPrice": "0",
            "triggerPriceType": "UNKNOWN_PRICE_TYPE",
            "expireTime": "1736476955478",
            "sourceKey": "",
            "isPositionTpsl": false,
            "isLiquidate": false,
            "isDeleverage": false,
            "openTpslParentOrderId": "0",
            "isSetOpenTp": false,
            "openTp": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isSetOpenSl": false,
            "openSl": {
                "side": "UNKNOWN_ORDER_SIDE",
                "price": "",
                "size": "",
                "clientOrderId": "",
                "triggerPrice": "",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "0",
                "l2Nonce": "0",
                "l2Value": "",
                "l2Size": "",
                "l2LimitFee": "",
                "l2ExpireTime": "0",
                "l2Signature": {
                    "r": "",
                    "s": "",
                    "v": ""
                }
            },
            "isWithoutMatch": false,
            "withoutMatchFillSize": "0",
            "withoutMatchFillValue": "0",
            "withoutMatchPeerAccountId": "0",
            "withoutMatchPeerOrderId": "0",
            "maxLeverage": "50",
            "takerFeeRate": "0.000500",
            "makerFeeRate": "0.000180",
            "liquidateFeeRate": "0.01",
            "marketLimitPrice": "0",
            "marketLimitValue": "0",
            "l2Nonce": "2054491946",
            "l2Value": "97.444500",
            "l2Size": "0.001",
            "l2LimitFee": "0.048723",
            "l2ExpireTime": "1737254555478",
            "l2Signature": {
                "r": "0x009af59c2963f1650449904fde059a83fed5beb4acdd67ffa22c551c4be977de",
                "s": "0x04940a395f2d1b39c0f2b969e47fec478fbfea9ce227bfedd07d407175dcac3e",
                "v": ""
            },
            "extraType": "",
            "extraDataJson": "",
            "status": "FILLED",
            "matchSequenceId": "35196430",
            "triggerTime": "0",
            "triggerPriceTime": "0",
            "triggerPriceValue": "0",
            "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
            "cumFillSize": "0.001",
            "cumFillValue": "97.4445",
            "cumFillFee": "0.017540",
            "maxFillPrice": "97444.5",
            "minFillPrice": "97444.5",
            "cumLiquidateFee": "0",
            "cumRealizePnl": "-0.017540",
            "cumMatchSize": "0.001",
            "cumMatchValue": "97.4445",
            "cumMatchFee": "0.017540",
            "cumFailSize": "0",
            "cumFailValue": "0",
            "cumFailFee": "0",
            "cumApprovedSize": "0",
            "cumApprovedValue": "0",
            "cumApprovedFee": "0",
            "createdTime": "1734662555665",
            "updatedTime": "1734662617992"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734666143318",
    "responseTime": "1734666143331",
    "traceId": "e19f71177e8cf0c7f34d45d85064c07c"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Response Data Structure

GET Get Active Orders (Paginated)

GET /api/v1/private/order/getActiveOrderPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

size

query

string

No

Number of items to fetch. Must be greater than 0 and less than or equal to 200.

offsetData

query

string

No

Pagination offset. If not provided or empty, retrieves the first page.

filterCoinIdList

query

string

No

Filters by collateral coin IDs. If empty, fetches active orders for all collateral coin IDs.

filterContractIdList

query

string

No

Filters by contract IDs. If empty, fetches active orders for all contracts.

filterTypeList

query

string

No

Filters by order types. If empty, fetches orders of all types.

filterStatusList

query

string

No

Filters by order status. If empty, fetches orders of all statuses.

filterIsLiquidateList

query

string

No

Filters by liquidate orders. If empty, fetches all orders

filterIsDeleverageList

query

string

No

Filters by deleverage orders. If empty, fetches all orders

filterIsPositionTpslList

query

string

No

Filters by position TP/SL orders. If empty, fetches all orders

filterStartCreatedTimeInclusive

query

string

No

Filters orders created after or on this time (inclusive). If empty or 0, retrieves from the earliest.

filterEndCreatedTimeExclusive

query

string

No

Filters orders created before this time (exclusive). If empty or 0, retrieves to the latest.

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "id": "564815695875932430",
                "userId": "543429922866069763",
                "accountId": "543429922991899150",
                "coinId": "1000",
                "contractId": "10000001",
                "side": "BUY",
                "price": "97444.5",
                "size": "0.001",
                "clientOrderId": "553364074986685",
                "type": "LIMIT",
                "timeInForce": "GOOD_TIL_CANCEL",
                "reduceOnly": false,
                "triggerPrice": "0",
                "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                "expireTime": "1736476955478",
                "sourceKey": "",
                "isPositionTpsl": false,
                "isLiquidate": false,
                "isDeleverage": false,
                "openTpslParentOrderId": "0",
                "isSetOpenTp": false,
                "openTp": {
                    "side": "UNKNOWN_ORDER_SIDE",
                    "price": "",
                    "size": "",
                    "clientOrderId": "",
                    "triggerPrice": "",
                    "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                    "expireTime": "0",
                    "l2Nonce": "0",
                    "l2Value": "",
                    "l2Size": "",
                    "l2LimitFee": "",
                    "l2ExpireTime": "0",
                    "l2Signature": {
                        "r": "",
                        "s": "",
                        "v": ""
                    }
                },
                "isSetOpenSl": false,
                "openSl": {
                    "side": "UNKNOWN_ORDER_SIDE",
                    "price": "",
                    "size": "",
                    "clientOrderId": "",
                    "triggerPrice": "",
                    "triggerPriceType": "UNKNOWN_PRICE_TYPE",
                    "expireTime": "0",
                    "l2Nonce": "0",
                    "l2Value": "",
                    "l2Size": "",
                    "l2LimitFee": "",
                    "l2ExpireTime": "0",
                    "l2Signature": {
                        "r": "",
                        "s": "",
                        "v": ""
                    }
                },
                "isWithoutMatch": false,
                "withoutMatchFillSize": "0",
                "withoutMatchFillValue": "0",
                "withoutMatchPeerAccountId": "0",
                "withoutMatchPeerOrderId": "0",
                "maxLeverage": "50",
                "takerFeeRate": "0.000500",
                "makerFeeRate": "0.000180",
                "liquidateFeeRate": "0.01",
                "marketLimitPrice": "0",
                "marketLimitValue": "0",
                "l2Nonce": "2054491946",
                "l2Value": "97.444500",
                "l2Size": "0.001",
                "l2LimitFee": "0.048723",
                "l2ExpireTime": "1737254555478",
                "l2Signature": {
                    "r": "0x009af59c2963f1650449904fde059a83fed5beb4acdd67ffa22c551c4be977de",
                    "s": "0x04940a395f2d1b39c0f2b969e47fec478fbfea9ce227bfedd07d407175dcac3e",
                    "v": ""
                },
                "extraType": "",
                "extraDataJson": "",
                "status": "OPEN",
                "matchSequenceId": "35195888",
                "triggerTime": "0",
                "triggerPriceTime": "0",
                "triggerPriceValue": "0",
                "cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
                "cumFillSize": "0",
                "cumFillValue": "0",
                "cumFillFee": "0",
                "maxFillPrice": "0",
                "minFillPrice": "0",
                "cumLiquidateFee": "0",
                "cumRealizePnl": "0",
                "cumMatchSize": "0",
                "cumMatchValue": "0",
                "cumMatchFee": "0",
                "cumFailSize": "0",
                "cumFailValue": "0",
                "cumFailFee": "0",
                "cumApprovedSize": "0",
                "cumApprovedValue": "0",
                "cumApprovedFee": "0",
                "createdTime": "1734662555665",
                "updatedTime": "1734662555672"
            }
        ],
        "nextPageOffsetData": ""
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734662566830",
    "responseTime": "1734662566836",
    "traceId": "4a97b2e8da4933980f399581dd4a1264"
}

Response

Status Code
Status Code Description
Description
Schema

200

default response

Data Models

schemaresultlistorderfilltransaction

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Successful response data.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemaorderfilltransaction

Name
Type
Required
Constraints
Description

id

string(int64)

false

none

Unique identifier.

userId

string(int64)

false

none

User ID.

accountId

string(int64)

false

none

Account ID.

coinId

string(int64)

false

none

Collateral coin ID.

contractId

string(int64)

false

none

Contract ID.

orderId

string(int64)

false

none

Order ID.

orderSide

string

false

none

Buy/Sell direction.

fillSize

string

false

none

Actual filled quantity.

fillValue

string

false

none

Actual filled value.

fillFee

string

false

none

Actual filled fee.

fillPrice

string

false

none

Fill price (not precise, for display purposes only).

liquidateFee

string

false

none

Liquidation fee if it's a liquidation (forced liquidation) transaction.

realizePnl

string

false

none

Realized profit and loss (only available if the fill includes closing a position).

direction

string

false

none

Actual fill direction.

isPositionTpsl

boolean

false

none

Whether this is a position take-profit/stop-loss order.

isLiquidate

boolean

false

none

Whether this is a liquidation (forced liquidation) fill.

isDeleverage

boolean

false

none

Whether this is an auto-deleverage fill.

isWithoutMatch

boolean

false

none

Whether this order was filled directly without matching.

matchSequenceId

string(int64)

false

none

Sequence ID after submitting to the matching engine.

matchIndex

integer(int32)

false

none

Index for multiple fills after submitting to the matching engine.

matchTime

string(int64)

false

none

Time after submitting to the matching engine.

matchAccountId

string(int64)

false

none

Counterparty account ID.

matchOrderId

string(int64)

false

none

Counterparty order ID.

matchFillId

string

false

none

Fill ID returned by the matching engine.

positionTransactionId

string(int64)

false

none

Associated position transaction ID.

collateralTransactionId

string(int64)

false

none

Associated collateral transaction ID.

extraType

string

false

none

Additional type for upper-layer business use.

extraDataJson

string

false

none

Additional data in JSON format. Defaults to an empty string.

censorStatus

string

false

none

Current censorship status.

censorTxId

string(int64)

false

none

Censorship processing sequence ID. Exists when censor_status is CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorTime

string(int64)

false

none

Censorship processing time. Exists when censor_status is CENSOR_SUCCESS/CENSOR_FAILURE/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

censorFailCode

string

false

none

Censorship failure error code. Exists when censor_status is CENSOR_FAILURE.

censorFailReason

string

false

none

Censorship failure reason. Exists when censor_status is CENSOR_FAILURE.

l2TxId

string(int64)

false

none

L2 push transaction ID. Exists when censor_status is CENSOR_SUCCESS/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED.

l2RejectTime

string(int64)

false

none

L2 rejection time. Exists when censor_status is L2_REJECT/L2_REJECT_APPROVED.

l2RejectCode

string

false

none

L2 rejection error code. Exists when censor_status is L2_REJECT/L2_REJECT_APPROVED.

l2RejectReason

string

false

none

L2 rejection reason. Exists when censor_status is L2_REJECT/L2_REJECT_APPROVED.

l2ApprovedTime

string(int64)

false

none

L2 batch verification time. Exists when status is L2_APPROVED/L2_REJECT_APPROVED.

createdTime

string(int64)

false

none

Creation time.

updatedTime

string(int64)

false

none

Update time.

Enum Values

Property
Value

orderSide

UNKNOWN_ORDER_SIDE

orderSide

BUY

orderSide

SELL

orderSide

UNRECOGNIZED

direction

UNKNOWN_LIQUIDITY_DIRECTION

direction

MAKER

direction

TAKER

direction

UNRECOGNIZED

censorStatus

UNKNOWN_TRANSACTION_STATUS

censorStatus

INIT

censorStatus

CENSOR_SUCCESS

censorStatus

CENSOR_FAILURE

censorStatus

L2_APPROVED

censorStatus

L2_REJECT

censorStatus

L2_REJECT_APPROVED

censorStatus

UNRECOGNIZED

schemaresultpagedataorderfilltransaction

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Generic paginated response.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemapagedataorderfilltransaction

Name
Type
Required
Constraints
Description

dataList

false

none

Data list.

nextPageOffsetData

string

false

none

Offset for retrieving the next page. Empty string if no more data available.

schemaresultpagedataorder

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Generic paginated response.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemapagedataorder

Name
Type
Required
Constraints
Description

dataList

false

none

Data list.

nextPageOffsetData

string

false

none

Offset for retrieving the next page. Empty string if no more data available.

schemaorder

Name
Type
Required
Constraints
Description

id

string(int64)

false

none

Order ID. Value greater than 0.

userId

string(int64)

false

none

User ID.

accountId

string(int64)

false

none

Account ID.

coinId

string(int64)

false

none

Collateral coin ID.

contractId

string(int64)

false

none

Contract ID.

side

string

false

none

Buy/Sell direction.

price

string

false

none

Order price (worst acceptable price), actual type is decimal.

size

string

false

none

Order quantity, actual type is decimal.

clientOrderId

string

false

none

Client-defined ID for idempotency checks.

type

string

false

none

Order type.

timeInForce

string

false

none

Order execution policy. Relevant when type is LIMIT/STOP_LIMIT/TAKE_PROFIT_LIMIT.

reduceOnly

boolean

false

none

Whether this is a reduce-only order.

triggerPrice

string

false

none

Trigger price. Relevant when type is STOP_LIMIT/STOP_MARKET/TAKE_PROFIT_LIMIT/TAKE_PROFIT_MARKET. If 0, the field is empty. Actual type is decimal.

triggerPriceType

string

false

none

Price type: Last price, Mark price, etc. Relevant when type is STOP_LIMIT/STOP_MARKET/TAKE_PROFIT_LIMIT/TAKE_PROFIT_MARKET.

expireTime

string(int64)

false

none

Expiration time.

sourceKey

string

false

none

Source key, UUID.

isPositionTpsl

boolean

false

none

Whether this is a position take-profit/stop-loss order.

isLiquidate

boolean

false

none

Whether this is a liquidation (forced liquidation) order.

isDeleverage

boolean

false

none

Whether this is an auto-deleverage order.

openTpslParentOrderId

string(int64)

false

none

Order ID of the opening order for a take-profit or stop-loss order.

isSetOpenTp

boolean

false

none

Whether take-profit is set for opening order.

openTp

false

none

Take-profit/stop-loss parameters for opening order.

isSetOpenSl

boolean

false

none

Whether stop-loss is set for opening order.

openSl

false

none

Take-profit/stop-loss parameters for opening order.

isWithoutMatch

boolean

false

none

Whether this order is directly filled without matching.

withoutMatchFillSize

string

false

none

Off-exchange fill quantity (valid only when is_without_match is true).

withoutMatchFillValue

string

false

none

Off-exchange fill value (valid only when is_without_match is true).

withoutMatchPeerAccountId

string(int64)

false

none

Off-exchange counterparty account ID (valid only when is_without_match is true).

withoutMatchPeerOrderId

string(int64)

false

none

Off-exchange counterparty order ID (valid only when is_without_match is true).

maxLeverage

string

false

none

Leverage used when placing the order. Actual type is decimal.

takerFeeRate

string

false

none

Taker fee rate when placing the order. Actual type is decimal.

makerFeeRate

string

false

none

Maker fee rate when placing the order. Actual type is decimal.

liquidateFeeRate

string

false

none

Liquidation fee rate when placing the order. Actual type is decimal.

marketLimitPrice

string

false

none

Limit price for submitting market orders to the matching engine (only exists for market orders, 0 otherwise). Actual type is decimal.

marketLimitValue

string

false

none

Limit value for submitting market orders to the matching engine (only exists for market orders, 0 otherwise). Actual type is decimal.

l2Nonce

string(int64)

false

none

L2 signature nonce. Takes the first 32 bits of sha256(client_order_id).

l2Value

string

false

none

L2 signature order value (the actual filled price must be equal to or better than l2_value / l2_size). May differ from price x size. Actual type is decimal.

l2Size

string

false

none

L2 signature order quantity. May differ from the size field. Actual type is decimal.

l2LimitFee

string

false

none

Maximum acceptable fee for L2 signature.

l2ExpireTime

string(int64)

false

none

L2 signature expiration time in milliseconds. The hour value should be used when generating/verifying the signature, i.e. l2_expire_time / 3600000. Note that this value must be greater or equal to expire_time + 8 * 24 * 60 * 60 * 1000 (8 days).

l2Signature

false

none

L2 signature information.

extraType

string

false

none

Additional type for upper-layer business use.

extraDataJson

string

false

none

Additional data in JSON format. Defaults to an empty string.

status

string

false

none

Order status.

matchSequenceId

string(int64)

false

none

Sequence ID handled by the matching engine.

triggerTime

string(int64)

false

none

Conditional order trigger time.

triggerPriceTime

string(int64)

false

none

Conditional order trigger price time.

triggerPriceValue

string

false

none

Conditional order trigger price value.

cancelReason

string

false

none

Order cancellation reason.

cumFillSize

string(decimal)

false

none

Cumulative filled quantity after censorship. Actual type is decimal.

cumFillValue

string(decimal)

false

none

Cumulative filled value after censorship. Actual type is decimal.

cumFillFee

string(decimal)

false

none

Cumulative filled fee after censorship. Actual type is decimal.

maxFillPrice

string(decimal)

false

none

Maximum filled price for the current order after censorship. Actual type is decimal.

minFillPrice

string(decimal)

false

none

Minimum filled price for the current order after censorship. Actual type is decimal.

cumLiquidateFee

string(decimal)

false

none

Cumulative liquidation fee after censorship. Actual type is decimal.

cumRealizePnl

string(decimal)

false

none

Cumulative realized PnL after censorship. Actual type is decimal.

cumMatchSize

string(decimal)

false

none

Cumulative matched quantity. Actual type is decimal.

cumMatchValue

string(decimal)

false

none

Cumulative matched value. Actual type is decimal.

cumMatchFee

string(decimal)

false

none

Cumulative matched fee. Actual type is decimal.

cumFailSize

string

false

none

Cumulative failed/L2 rejected quantity. Actual type is decimal.

cumFailValue

string

false

none

Cumulative failed/L2 rejected value. Actual type is decimal.

cumFailFee

string

false

none

Cumulative failed/L2 rejected fee. Actual type is decimal.

cumApprovedSize

string

false

none

Cumulative quantity approved by L2.

cumApprovedValue

string

false

none

Cumulative value approved by L2.

cumApprovedFee

string

false

none

Cumulative fee approved by L2.

createdTime

string(int64)

false

none

Creation time.

updatedTime

string(int64)

false

none

Update time.

Enum Values

Property
Value

side

UNKNOWN_ORDER_SIDE

side

BUY

side

SELL

side

UNRECOGNIZED

type

UNKNOWN_ORDER_TYPE

type

LIMIT

type

MARKET

type

STOP_LIMIT

type

STOP_MARKET

type

TAKE_PROFIT_LIMIT

type

TAKE_PROFIT_MARKET

type

UNRECOGNIZED

timeInForce

UNKNOWN_TIME_IN_FORCE

timeInForce

GOOD_TIL_CANCEL

timeInForce

FILL_OR_KILL

timeInForce

IMMEDIATE_OR_CANCEL

timeInForce

POST_ONLY

timeInForce

UNRECOGNIZED

triggerPriceType

UNKNOWN_PRICE_TYPE

triggerPriceType

ORACLE_PRICE

triggerPriceType

INDEX_PRICE

triggerPriceType

LAST_PRICE

triggerPriceType

ASK1_PRICE

triggerPriceType

BID1_PRICE

triggerPriceType

OPEN_INTEREST

triggerPriceType

UNRECOGNIZED

status

UNKNOWN_ORDER_STATUS

status

PENDING

status

OPEN

status

FILLED

status

CANCELING

status

CANCELED

status

UNTRIGGERED

status

UNRECOGNIZED

cancelReason

UNKNOWN_ORDER_CANCEL_REASON

cancelReason

USER_CANCELED

cancelReason

EXPIRE_CANCELED

cancelReason

COULD_NOT_FILL

cancelReason

REDUCE_ONLY_CANCELED

cancelReason

LIQUIDATE_CANCELED

cancelReason

MARGIN_NOT_ENOUGH

cancelReason

SYSTEM_LIMIT_EVICTED

cancelReason

ADMIN_CANCELED

cancelReason

INTERNAL_FAILED

cancelReason

UNRECOGNIZED

schemal2signature

Name
Type
Required
Constraints
Description

r

string

false

none

Big integer as a hex string.

s

string

false

none

Big integer as a hex string.

v

string

false

none

Big integer as a hex string.

schemaopentpsl

Name
Type
Required
Constraints
Description

side

string

false

none

Buy/sell direction. This field is required.

price

string

false

none

Order price (worst acceptable price), actual type is decimal. Required, enter 0 for market orders.

size

string

false

none

Order quantity, actual type is decimal. Required.

clientOrderId

string

false

none

Client-defined ID for signature and idempotency checks. This field is required.

triggerPrice

string

false

none

Trigger price. This field is required.

triggerPriceType

string

false

none

Price type: Last price, Mark price, etc. This field is required.

expireTime

string(int64)

false

none

Expiration time.

l2Nonce

string(int64)

false

none

L2 signature nonce. Takes the first 32 bits of sha256(client_order_id).

l2Value

string

false

none

L2 signature order value (the actual filled price must be equal to or better than l2_value / l2_price). May differ from price x size. Actual type is decimal.

l2Size

string

false

none

L2 signature order quantity. May differ from the size field. Actual type is decimal.

l2LimitFee

string

false

none

Maximum acceptable fee for L2 signature.

l2ExpireTime

string(int64)

false

none

L2 signature expiration time in unix hour. Must be at least 10 hours after expire_time.

l2Signature

false

none

L2 signature information.

Enum Values

Property
Value

side

UNKNOWN_ORDER_SIDE

side

BUY

side

SELL

side

UNRECOGNIZED

triggerPriceType

UNKNOWN_PRICE_TYPE

triggerPriceType

ORACLE_PRICE

triggerPriceType

INDEX_PRICE

triggerPriceType

LAST_PRICE

triggerPriceType

ASK1_PRICE

triggerPriceType

BID1_PRICE

triggerPriceType

OPEN_INTEREST

triggerPriceType

UNRECOGNIZED

schemaresultlistorder

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Successful response data.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemacancelallorderparam

Name
Type
Required
Constraints
Description

accountId

string(int64)

false

none

Account ID.

filterCoinIdList

[string]

false

none

Filter to cancel active orders for specific collateral coin IDs. If empty, cancels all.

filterContractIdList

[string]

false

none

Filter to cancel active orders for specific contract IDs. If empty, cancels all.

filterOrderTypeList

[string]

false

none

Filter to cancel orders of specific types. If empty, cancels all types.

filterOrderStatusList

[string]

false

none

Filter to cancel orders of specific statuses. If empty, cancels all statuses.

filterIsPositionTpsl

[boolean]

false

none

Filter to cancel only corresponding position take-profit/stop-loss orders. If empty, cancels all contract orders.

<### schemacancelorderbyclientorderid

Name
Type
Required
Constraints
Description

cancelResultMap

object

false

none

None

Enum Values

Property
Value

additionalProperties

UNKNOWN_ORDER_CANCEL_RESULT

additionalProperties

SUCCESS

additionalProperties

SUCCESS_ORDER_CANCELING

additionalProperties

SUCCESS_ORDER_CANCELED

additionalProperties

FAILED_ORDER_NOT_FOUND

additionalProperties

FAILED_ORDER_FILLED

additionalProperties

FAILED_ORDER_UNKNOWN_STATUS

additionalProperties

UNRECOGNIZED

schemaresultcancelorder

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Response for canceling orders.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemacancelorder

Name
Type
Required
Constraints
Description

cancelResultMap

object

false

none

None

Enum Values

Property
Value

additionalProperties

UNKNOWN_ORDER_CANCEL_RESULT

additionalProperties

SUCCESS

additionalProperties

SUCCESS_ORDER_CANCELING

additionalProperties

SUCCESS_ORDER_CANCELED

additionalProperties

FAILED_ORDER_NOT_FOUND

additionalProperties

FAILED_ORDER_FILLED

additionalProperties

FAILED_ORDER_UNKNOWN_STATUS

additionalProperties

UNRECOGNIZED

schemacancelorderbyidparam

Name
Type
Required
Constraints
Description

accountId

string(int64)

false

none

Account ID.

orderIdList

[string]

true

none

Order ID.

schemaresultcreateorder

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Response for creating orders.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemacreateorder

Name
Type
Required
Constraints
Description

orderId

string(int64)

false

none

Order ID.

schemacreateorderparam

Name
Type
Required
Constraints
Description

accountId

string(int64)

false

none

Account ID.

contractId

string(int64)

false

none

Contract ID.

side

string

false

none

Buy/sell direction. This field is required.

size

string

false

none

Order quantity. Actual type is decimal. This field is required.

price

string

false

none

Order price (worst acceptable price). Actual type is decimal. This field is required, enter 0 for market orders.

clientOrderId

string

false

none

Client-defined ID for idempotency checks. This field is required.

type

string

false

none

Order type. This field is required.

timeInForce

string

false

none

Order execution policy. Relevant when type is LIMIT/STOP_LIMIT/TAKE_PROFIT_LIMIT. This field is required, and should be IMMEDIATE_OR_CANCEL for market orders.

reduceOnly

boolean

false

none

Whether this is a reduce-only order. This field is required.

triggerPrice

string

false

none

Trigger price. Relevant when type is STOP_LIMIT/STOP_MARKET/TAKE_PROFIT_LIMIT/TAKE_PROFIT_MARKET. If 0, the field is empty. Actual type is decimal. Required for conditional orders.

triggerPriceType

string

false

none

Price type: Last price, Mark price, etc. Relevant when the order is conditional. Required for conditional orders.

expireTime

string(int64)

false

none

Expiration time.

sourceKey

string

false

none

Source key, UUID.

isPositionTpsl

boolean

false

none

Whether this is a position take-profit/stop-loss order. This field is required, defaults to false.

openTpslParentOrderId

string(int64)

false

none

Order ID of the opening order for a take-profit or stop-loss order.

isSetOpenTp

boolean

false

none

Whether to set take-profit for the opening order. This field is required.

openTp

false

none

Take-profit/stop-loss parameters for the opening order.

openSl

false

none

Take-profit/stop-loss parameters for the opening order.

l2Nonce

string(int64)

false

none

L2 signature nonce. Takes the first 32 bits of sha256(client_order_id).

l2Value

string

false

none

L2 signature order value (the actual filled price must be equal to or better than l2_value / l2_price). May differ from price x size. Actual type is decimal.

l2Size

string

false

none

L2 signature order quantity. May differ from the size field. Actual type is decimal.

l2LimitFee

string

false

none

Maximum acceptable fee for L2 signature.

l2ExpireTime

string(int64)

false

none

L2 signature expiration time in milliseconds. The hour value should be used when generating/verifying the signature, i.e. l2_expire_time / 3600000. Note that this value must be greater or equal to expire_time + 8 * 24 * 60 * 60 * 1000 (8 days).

l2Signature

string

false

none

L2 signature.

extraType

string

false

none

Additional type for upper-layer business use.

extraDataJson

string

false

none

Additional data in JSON format. Defaults to an empty string.

Enum Values

Property
Value

side

UNKNOWN_ORDER_SIDE

side

BUY

side

SELL

side

UNRECOGNIZED

type

UNKNOWN_ORDER_TYPE

type

LIMIT

type

MARKET

type

STOP_LIMIT

type

STOP_MARKET

type

TAKE_PROFIT_LIMIT

type

TAKE_PROFIT_MARKET

type

UNRECOGNIZED

timeInForce

UNKNOWN_TIME_IN_FORCE

timeInForce

GOOD_TIL_CANCEL

timeInForce

FILL_OR_KILL

timeInForce

IMMEDIATE_OR_CANCEL

timeInForce

POST_ONLY

timeInForce

UNRECOGNIZED

triggerPriceType

UNKNOWN_PRICE_TYPE

triggerPriceType

ORACLE_PRICE

triggerPriceType

INDEX_PRICE

triggerPriceType

LAST_PRICE

triggerPriceType

ASK1_PRICE

triggerPriceType

BID1_PRICE

triggerPriceType

OPEN_INTEREST

triggerPriceType

UNRECOGNIZED

schemaopentpslparam

Name
Type
Required
Constraints
Description

side

string

false

none

Buy/sell direction. This field is required.

price

string

false

none

Order price (worst acceptable price). Actual type is decimal. This field is required, enter 0 for market orders.

size

string

false

none

Order quantity. Actual type is decimal. This field is required.

clientOrderId

string

false

none

Client-defined ID for signature and idempotency checks. This field is required.

triggerPrice

string

false

none

Trigger price. This field is required.

triggerPriceType

string

false

none

Price type: Last price, Mark price, etc. This field is required.

expireTime

string(int64)

false

none

Expiration time.

l2Nonce

string(int64)

false

none

L2 signature nonce. Takes the first 32 bits of sha256(client_order_id).

l2Value

string

false

none

L2 signature order value (the actual filled price must be equal to or better than l2_value / l2_price). May differ from price x size. Actual type is decimal.

l2Size

string

false

none

L2 signature order quantity. May differ from the size field. Actual type is decimal.

l2LimitFee

string

false

none

Maximum acceptable fee for L2 signature.

l2ExpireTime

string

false

none

L2 signature expiration time in unix hour. Must be at least 10 hours after expire_time.

l2Signature

string

false

none

L2 signature.

Enum Values

Property
Value

side

UNKNOWN_ORDER_SIDE

side

BUY

side

SELL

side

UNRECOGNIZED

triggerPriceType

UNKNOWN_PRICE_TYPE

triggerPriceType

ORACLE_PRICE

triggerPriceType

INDEX_PRICE

triggerPriceType

LAST_PRICE

triggerPriceType

ASK1_PRICE

triggerPriceType

BID1_PRICE

triggerPriceType

OPEN_INTEREST

triggerPriceType

UNRECOGNIZED

schemaresultgetmaxcreateordersize

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, otherwise failure.

data

false

none

Response for getting the maximum order size.

errorParam

object

false

none

Parameter information in error messages.

requestTime

string(timestamp)

false

none

Server request receive time.

responseTime

string(timestamp)

false

none

Server response return time.

traceId

string

false

none

Call trace ID.

schemagetmaxcreateordersize

Name
Type
Required
Constraints
Description

maxBuySize

string(decimal)

false

none

Maximum buy size.

maxSellSize

string(decimal)

false

none

Maximum sell size.

ask1Price

string(decimal)

false

none

Best ask price.

bid1Price

string(decimal)

false

none

Best bid price.

schemagetmaxcreateordersizeparam

Name
Type
Required
Constraints
Description

accountId

string(int64)

false

none

Account ID.

contractId

string(int64)

false

none

Contract ID.

price

string

false

none

Order price.

Last updated

Transfer API | edgeX Docs

Transfer API

TransferPrivateApi

POST Create Transfer Out Order

POST /api/v1/private/transfer/createTransferOut

Body Request Parameters

{
    "accountId": "543429922991899150",
    "coinId": "1000",
    "amount": "1.000000",
    "receiverAccountId": "551109015904453258",
    "receiverL2Key": "0x03eec711e360695bb44b1170057a25340303c1f16893a8def7450e44294405a8",
    "clientTransferId": "3877531064364166",
    "transferReason": "USER_TRANSFER",
    "l2Nonce": "2280110103",
    "l2ExpireTime": "1735873200000",
    "l2Signature": "0141279ec45ce1ea37b11cfa4683cfab8443bcbf8da3f066cef3e437862573f9034efe12eee1be3fc715c7b511f69e3ba32ec67a9ac89538fbb73de46fefc5e5",
    "extraType": "",
    "extraDataJson": ""
}

Request Parameters

Name
Location
Type
Required
Description

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "transferOutId": "564819036077031694"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734663351997",
    "responseTime": "1734663352035",
    "traceId": "33728335fc663ba9230e61d4f4b924df"
}

Response Codes

Status Code
Description
Notes
Schema

200

default response

GET Get Transfer Out Orders by ID

GET /api/v1/private/transfer/getTransferOutById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

transferOutIdList

query

string

No

Transfer out ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564819036077031694",
            "userId": "543429922866069763",
            "accountId": "543429922991899150",
            "coinId": "1000",
            "amount": "1.000000",
            "receiverAccountId": "551109015904453258",
            "receiverL2Key": "0x3eec711e360695bb44b1170057a25340303c1f16893a8def7450e44294405a8",
            "clientTransferId": "3877531064364166",
            "isConditionTransfer": false,
            "conditionFactRegistryAddress": "",
            "conditionFactErc20Address": "",
            "conditionFactAmount": "",
            "conditionFact": "",
            "transferReason": "USER_TRANSFER",
            "l2Nonce": "2280110103",
            "l2ExpireTime": "1735873200000",
            "l2Signature": {
                "r": "0x0141279ec45ce1ea37b11cfa4683cfab8443bcbf8da3f066cef3e437862573f9",
                "s": "0x034efe12eee1be3fc715c7b511f69e3ba32ec67a9ac89538fbb73de46fefc5e5",
                "v": ""
            },
            "extraType": "",
            "extraDataJson": "",
            "status": "SUCCESS_CENSOR_SUCCESS",
            "receiverTransferInId": "564819036173500554",
            "collateralTransactionId": "564819036223832334",
            "censorTxId": "893179",
            "censorTime": "1734663352062",
            "censorFailCode": "",
            "censorFailReason": "",
            "l2TxId": "1084730",
            "l2RejectTime": "0",
            "l2RejectCode": "",
            "l2RejectReason": "",
            "l2ApprovedTime": "0",
            "createdTime": "1734663352031",
            "updatedTime": "1734663352066"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734663607244",
    "responseTime": "1734663607271",
    "traceId": "39366eb1153313ba1415851a08762265"
}

Response Codes

Status Code
Description
Notes
Schema

200

default response

GET Get Available Withdrawal Amount

GET /api/v1/private/transfer/getTransferOutAvailableAmount

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

coinId

query

string

No

Coin ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "availableAmount": "10.964371"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734663286946",
    "responseTime": "1734663286951",
    "traceId": "957f0396a8e6059b027b99d232f8b113"
}

Response Codes

Status Code
Description
Notes
Schema

200

default response

GET Get Transfer In Orders by ID

GET /api/v1/private/transfer/getTransferInById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

transferInIdList

query

string

No

Transfer In ID

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": [
        {
            "id": "564819036173500554",
            "userId": "543429922866069763",
            "accountId": "551109015904453258",
            "coinId": "1000",
            "amount": "1.000000",
            "senderAccountId": "543429922991899150",
            "senderL2Key": "0x5580341e2c99823a0a35356b8ac84e372dd38fd1f4b50f607b931ec8038c211",
            "senderTransferOutId": "564819036077031694",
            "clientTransferId": "543429922991899150:3877531064364166",
            "isConditionTransfer": false,
            "conditionFactRegistryAddress": "",
            "conditionFactErc20Address": "",
            "conditionFactAmount": "",
            "conditionFact": "",
            "transferReason": "USER_TRANSFER",
            "extraType": "",
            "extraDataJson": "",
            "status": "SUCCESS_CENSOR_SUCCESS",
            "collateralTransactionId": "564819036219637898",
            "censorTxId": "893179",
            "censorTime": "1734663352062",
            "censorFailCode": "",
            "censorFailReason": "",
            "l2TxId": "1084730",
            "l2RejectTime": "0",
            "l2RejectCode": "",
            "l2RejectReason": "",
            "l2ApprovedTime": "0",
            "createdTime": "1734663352054",
            "updatedTime": "1734663352065"
        }
    ],
    "msg": null,
    "errorParam": null,
    "requestTime": "1734663945432",
    "responseTime": "1734663945452",
    "traceId": "eb4cfe0a20f14b62b4fdbbd046255171"
}

Response Codes

Status Code
Description
Notes
Schema

200

default response

Data Models

schemaresultpagedatatransferin

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Generic paginated response data

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemapagedatatransferin

Name
Type
Required
Constraints
Description

dataList

false

none

Data list

nextPageOffsetData

string

false

none

Offset to retrieve the next page. If no next page data, the value will be an empty string

schematransferin

Name
Type
Required
Constraints
Description

id

string(int64)

false

none

Transfer In order ID

userId

string(int64)

false

none

User ID

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Coin ID

amount

string

false

none

Transfer amount

senderAccountId

string(int64)

false

none

Sender Account ID

senderL2Key

string

false

none

Sender account L2 key. bigint for hex str

senderTransferOutId

string(int64)

false

none

Sender transfer out order ID

clientTransferId

string

false

none

Client defined ID. Used for idempotent checks and signature generation nonce

isConditionTransfer

boolean

false

none

Whether it is a conditional transfer

conditionFactRegistryAddress

string

false

none

Address of condition fact registry contract. Required when is_condition_transfer=true

conditionFactErc20Address

string

false

none

ERC20 address used to generate the condition fact. Required when is_conditional_transfer=true

conditionFactAmount

string

false

none

Amount used to generate condition fact. Required when is_conditional_transfer=true.

conditionFact

string

false

none

The conditional transfer fact. Required when is_condition_transfer=true

transferReason

string

false

none

Transfer reason

extraType

string

false

none

Additional type. Used by upper layer business

extraDataJson

string

false

none

Additional data in JSON format. Defaults to empty string

status

string

false

none

Transfer status

collateralTransactionId

string(int64)

false

none

ID of related collateral detail. Exists when status=SUCCESS_XXX/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorTxId

string(int64)

false

none

Censor processing sequence. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorTime

string(int64)

false

none

Censor processing time. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorFailCode

string

false

none

Censor failure error code. Exists when status=FAILED_CENSOR_FAILURE

censorFailReason

string

false

none

Censor failure reason. Exists when status=FAILED_CENSOR_FAILURE

l2TxId

string(int64)

false

none

L2 push transaction ID. Exists when censor_status=CENSOR_SUCCESS/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED

l2RejectTime

string(int64)

false

none

L2 rejection time. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2RejectCode

string

false

none

L2 rejection error code. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2RejectReason

string

false

none

L2 rejection reason. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2ApprovedTime

string(int64)

false

none

L2 batch verification time. Exists when status=L2_APPROVED/L2_REJECT_APPROVED

createdTime

string(int64)

false

none

Creation time

updatedTime

string(int64)

false

none

Update time

Enum Values

Property
Value

transferReason

UNKNOWN_TRANSFER_REASON

transferReason

USER_TRANSFER

transferReason

FAST_WITHDRAW

transferReason

CROSS_DEPOSIT

transferReason

CROSS_WITHDRAW

transferReason

UNRECOGNIZED

status

UNKNOWN_TRANSFER_STATUS

status

PENDING_CHECKING

status

PENDING_CENSORING

status

SUCCESS_CENSOR_SUCCESS

status

SUCCESS_L2_APPROVED

status

FAILED_CHECK_INVALID

status

FAILED_CENSOR_FAILURE

status

FAILED_L2_REJECT

status

FAILED_L2_REJECT_APPROVED

status

UNRECOGNIZED

schemaresultpagedatatransferout

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Generic paginated response data

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemapagedatatransferout

Name
Type
Required
Constraints
Description

dataList

false

none

Data list

nextPageOffsetData

string

false

none

Offset to retrieve the next page. If no next page data, the value will be an empty string

schematransferout

Name
Type
Required
Constraints
Description

id

string(int64)

false

none

Transfer out order ID

userId

string(int64)

false

none

User ID

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Coin ID

amount

string

false

none

Transfer amount

receiverAccountId

string(int64)

false

none

Receiver Account ID

receiverL2Key

string

false

none

Receiver account L2 key. bigint for hex str

clientTransferId

string

false

none

Client defined ID. Used for idempotent checks and signature generation nonce

isConditionTransfer

boolean

false

none

Whether it is a conditional transfer

conditionFactRegistryAddress

string

false

none

Address of condition fact registry contract. Required when is_conditional_transfer=true

conditionFactErc20Address

string

false

none

ERC20 address used to generate the condition fact. Required when is_conditional_transfer=true

conditionFactAmount

string

false

none

Amount used to generate condition fact. Required when is_conditional_transfer=true.

conditionFact

string

false

none

The conditional transfer fact. Required when is_conditional_transfer=true

transferReason

string

false

none

Transfer reason

l2Nonce

string(int64)

false

none

L2 signature nonce. Take the first 32 bits of sha256(client_transfer_id)

l2ExpireTime

string(int64)

false

none

L2 signature expiration time in milliseconds. When generating/verifying the signature, the hour should be used: l2_expire_time / 3600000

l2Signature

false

none

L2 signature information

extraType

string

false

none

Additional type. Used by upper layer business

extraDataJson

string

false

none

Additional data in JSON format. Defaults to empty string

status

string

false

none

Transfer status

receiverTransferInId

string(int64)

false

none

ID of receiver transfer in order.

collateralTransactionId

string(int64)

false

none

ID of related collateral detail. Exists when status=SUCCESS_XXX/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorTxId

string(int64)

false

none

Censor processing sequence. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorTime

string(int64)

false

none

Censor processing time. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECT/FAILED_L2_REJECT_APPROVED

censorFailCode

string

false

none

Censor failure error code. Exists when status=FAILED_CENSOR_FAILURE

censorFailReason

string

false

none

Censor failure reason. Exists when status=FAILED_CENSOR_FAILURE

l2TxId

string(int64)

false

none

L2 push transaction ID. Exists when censor_status=CENSOR_SUCCESS/L2_APPROVED/L2_REJECT/L2_REJECT_APPROVED

l2RejectTime

string(int64)

false

none

L2 rejection time. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2RejectCode

string

false

none

L2 rejection error code. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2RejectReason

string

false

none

L2 rejection reason. Exists when censor_status=L2_REJECT/L2_REJECT_APPROVED

l2ApprovedTime

string(int64)

false

none

L2 batch verification time. Exists when status=L2_APPROVED/L2_REJECT_APPROVED

createdTime

string(int64)

false

none

Creation time

updatedTime

string(int64)

false

none

Update time

Enum Values

Property
Value

transferReason

UNKNOWN_TRANSFER_REASON

transferReason

USER_TRANSFER

transferReason

FAST_WITHDRAW

transferReason

CROSS_DEPOSIT

transferReason

CROSS_WITHDRAW

transferReason

UNRECOGNIZED

status

UNKNOWN_TRANSFER_STATUS

status

PENDING_CHECKING

status

PENDING_CENSORING

status

SUCCESS_CENSOR_SUCCESS

status

SUCCESS_L2_APPROVED

status

FAILED_CHECK_INVALID

status

FAILED_CENSOR_FAILURE

status

FAILED_L2_REJECT

status

FAILED_L2_REJECT_APPROVED

status

UNRECOGNIZED

schemal2signature

Name
Type
Required
Constraints
Description

r

string

false

none

bigint for hex str

s

string

false

none

bigint for hex str

v

string

false

none

bigint for hex str

schemaresultlisttransferin

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Correct response data

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemaresultgettransferoutavailableamount

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Get Transfer Available Amount - Response

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemagettransferavailableamount

Name
Type
Required
Constraints
Description

availableAmount

string(decimal)

false

none

Available amount

schemaresultlisttransferout

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Correct response data

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemaresultcreatetransferout

Name
Type
Required
Constraints
Description

code

string

false

none

Status code. "SUCCESS" for success, other values indicate failure.

data

false

none

Create Transfer Out Order - Response

errorParam

object

false

none

Parameter information in error messages

requestTime

string(timestamp)

false

none

Server request receiving timestamp

responseTime

string(timestamp)

false

none

Server response returning timestamp

traceId

string

false

none

Call trace ID

schemacreatetransferout

Name
Type
Required
Constraints
Description

transferOutId

string(int64)

false

none

Transfer out order ID

schemacreatetransferoutparam

Name
Type
Required
Constraints
Description

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Asset ID

amount

string

false

none

Transfer amount

receiverAccountId

string

false

none

Receiver account ID

receiverL2Key

string

false

none

Receiver account L2 key. bigint for hex str

clientTransferId

string

false

none

Client defined ID. Used for idempotent checks and signature generation nonce

transferReason

string

false

none

Transfer reason

l2Nonce

string(int64)

false

none

L2 signature nonce. Take the first 32 bits of sha256(client_withdraw_id)

l2ExpireTime

string(int64)

false

none

L2 signature expiration time in milliseconds. When generating/verifying the signature, the hour should be used: l2_expire_time / 3600000

l2Signature

string

false

none

L2 signature

extraType

string

false

none

Additional type. Used by upper layer business

extraDataJson

string

false

none

Additional data in JSON format. Defaults to empty string

Enum Values

Property
Value

transferReason

UNKNOWN_TRANSFER_REASON

transferReason

USER_TRANSFER

transferReason

FAST_WITHDRAW

transferReason

CROSS_DEPOSIT

transferReason

CROSS_WITHDRAW

transferReason

UNRECOGNIZED

Last updated

Asset API | edgeX Docs

Asset API

AssetsPrivateApi

POST Create Normal Withdrawal Order

POST /api/v1/private/assets/createNormalWithdraw

Body Request Parameters

{
    "accountId": "551109015904453258",
    "coinId": "1000",
    "amount": "1.000000",
    "ethAddress": "0x1fB51aa234287C3CA1F957eA9AD0E148Bb814b7A",
    "clientWithdrawId": "745410645654877",
    "expireTime": "1735887600000",
    "l2Signature": "007bf80407c6a7bb14f5ca3b848a5d908627993f23b073c902e359a6fa4a6a92040cea4c98e25e35ad1d8cc4e18758c463c45bf451299ce55aa49abbdb916d03"
}

Request Parameters

Name
Location
Type
Required
Description

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "withdrawId": "1054639949233524736"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734674558154",
    "responseTime": "1734674558171",
    "traceId": "9e3bfe2b9e1ef82583cb96f36e43e537"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

POST Create Cross-Chain Withdrawal Order

POST /api/v1/private/assets/createCrossWithdraw

Body Request Parameters

{
  "accountId": "string",
  "coinId": "string",
  "amount": "string",
  "ethAddress": "string",
  "erc20Address": "string",
  "lpAccountId": "string",
  "clientCrossWithdrawId": "string",
  "expireTime": "string",
  "l2Signature": "string",
  "fee": "string",
  "chainId": "string",
  "mpcAddress": "string",
  "mpcSignature": "string",
  "mpcSignTime": "string"
}

Request Parameters

Name
Location
Type
Required
Description

Response Example

200 Response

{
  "code": "string",
  "msg": "string",
  "requestTime": "string",
  "responseTime": "string"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

GET User's Normal Withdrawable Amount

GET /api/v1/private/assets/getNormalWithdrawableAmount

Request Parameters

Name
Location
Type
Required
Description

address

query

string

Yes

User address

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "amount": "0"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734674463329",
    "responseTime": "1734674464181",
    "traceId": "6e8a3b8326f00683cf73f701f3edcfb6"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

GET Get Normal Withdrawal Orders by Account ID and Withdrawal ID

GET /api/v1/private/assets/getNormalWithdrawById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

normalWithdrawIdList

query

string

No

Withdrawal ID

Response Example

200 Response

{
  "code": "string",
  "msg": "string",
  "requestTime": "string",
  "responseTime": "string"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

GET Get Information Required for Cross-Chain Withdrawal Signature

GET /api/v1/private/assets/getCrossWithdrawSignInfo

Request Parameters

Name
Location
Type
Required
Description

chainId

query

string

No

Chain ID

amount

query

string

No

Withdrawal amount

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "lpAccountId": "542076087396467085",
        "crossWithdrawL2Key": "0x03bf794b4433e0a8b353da361bb7284c670914d27ed04698e6abed0bf1198028",
        "crossWithdrawMaxAmount": "48799.686154",
        "fee": "2"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734674557578",
    "responseTime": "1734674557997",
    "traceId": "3aa3d5c94c7bc9aef69f590e188058ef"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

GET Get Cross-Chain Withdrawal Orders by Account ID and Withdrawal ID

GET /api/v1/private/assets/getCrossWithdrawById

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

crossWithdrawIdList

query

string

No

Withdrawal ID

Response Example

200 Response

{
  "code": "string",
  "msg": "string",
  "requestTime": "string",
  "responseTime": "string"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

GET Aggregate Query of All Deposit and Withdrawal Order Records

GET /api/v1/private/assets/getAllOrdersPage

Request Parameters

Name
Location
Type
Required
Description

accountId

query

string

No

Account ID

startTime

query

string

No

Start time, Unix time in seconds

endTime

query

string

No

End time, Unix time in seconds

chainId

query

string

No

Chain ID

typeList

query

string

No

Order type list

size

query

string

No

Number of items per page. Must be > 0 and <= 100.

offsetData

query

string

No

Offset for page retrieval. If not provided, returns first page

Response Example

200 Response

{
    "code": "SUCCESS",
    "data": {
        "dataList": [
            {
                "orderId": "1054639949233524736",
                "time": "1734674558",
                "type": "ORDER_TYPE_NORMAL_WITHDRAW",
                "status": 3,
                "amount": "1",
                "fee": "",
                "txId": "",
                "chain": "Sepolia - Testnet",
                "address": "0x1fB51aa234287C3CA1F957eA9AD0E148Bb814b7A",
                "coin": "USDT",
                "chainId": "11155111",
                "transferSenderAccountId": "0",
                "transferReceiverAccountId": "0"
            }
        ],
        "nextPageOffsetData": "b3fa59aa-8b42-49a3-9729-d7e89d8d9c8d"
    },
    "msg": null,
    "errorParam": null,
    "requestTime": "1734675194541",
    "responseTime": "1734675194553",
    "traceId": "d6f1fe9e521e306a49f30158257a07a2"
}

Response

Status Code
Status Code Description
Description
Data Model

200

Default response

Data Models

schemaresultpagedatassetorder

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Generic paginated return

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemapagedataassetorder

Name
Type
Required
Constraints
Description
Notes

dataList

false

none

List of data

nextPageOffsetData

string

false

none

Offset for next page

Empty string when there are no further pages.

schemaassetorder

Name
Type
Required
Constraints
Description
Notes

orderId

string(int64)

false

none

Order ID

time

string(int64)

false

none

Order creation time

type

string

false

none

Order type

status

integer(int32)

false

none

Order status

amount

string

false

none

Order amount

fee

string

false

none

Order fee

txId

string

false

none

Chain tx_id

chain

string

false

none

Chain

address

string

false

none

Address

coin

string

false

none

Coin

chainId

string

false

none

Chain ID

transferSenderAccountId

string

false

none

Transfer out account ID

transferReceiverAccountId

string

false

none

Transfer in account ID

Enum Values

Property
Value

type

UNKNOWN_ORDER_TYPE

type

ORDER_TYPE_NORMAL_DEPOSIT

type

ORDER_TYPE_CROSS_DEPOSIT

type

ORDER_TYPE_NORMAL_WITHDRAW

type

ORDER_TYPE_CROSS_WITHDRAW

type

ORDER_TYPE_FAST_WITHDRAW

type

ORDER_TYPE_TRANSFER_IN

type

ORDER_TYPE_TRANSFER_OUT

type

UNRECOGNIZED

schemaresultlistcrosswithdraw

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

data

false

none

Correct response data

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemacrosswithdraw

Name
Type
Required
Constraints
Description
Notes

id

string(int64)

false

none

Withdrawal order ID

userId

string(int64)

false

none

User ID

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Collateral coin ID

amount

string

false

none

Withdrawal amount

ethAddress

string

false

none

ETH address for withdrawal, may differ from the account's ETH address.

erc20Address

string

false

none

L1 ERC20 contract address for the withdrawn asset

lpAccountId

string(int64)

false

none

LP account ID for L2 receiving user transfers

lpAccountL2Key

string(int64)

false

none

L2 key for the receiving account

clientCrossWithdrawId

string

false

none

Client-defined ID for idempotent checks

fee

string

false

none

Transaction fee

chainId

string

false

none

Chain ID for withdrawal

l2Nonce

string(int64)

false

none

L2 signature nonce. First 32 bits of sha256(client_withdraw_id)

l2ExpireTime

string(int64)

false

none

L2 signature expiration time. Unix time in hours, must be at least 24 hours after order creation.

l2Signature

false

none

L2 signature information

extraType

string

false

none

Additional type for upper-layer business usage

extraDataJson

string

false

none

Extra data, JSON format, defaults to empty string.

status

string

false

none

Normal withdrawal order status

collateralTransactionId

string

false

none

Related collateral detail ID. Exists when status=SUCCESS_XXX/FAILED_L2_REJECTED

censorTxId

string(int64)

false

none

Censorship processing sequence number. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECTED

censorTime

string(int64)

false

none

Censorship processing time. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECTED

censorFailCode

string

false

none

Censorship failure error code. Exists when status=FAILED_CENSOR_FAILURE

censorFailReason

string

false

none

Censorship failure reason. Exists when status=FAILED_CENSOR_FAILURE

l2TxId

string(int64)

false

none

L2 transaction ID. Exists when status=SUCCESS_XXX/FAILED_CENSOR_FAILURE/FAILED_L2_REJECTED

l2HandleTime

string(int64)

false

none

L2 processing time. Exists when status=SUCCESS_L1_CONFIRMING/SUCCESS_L1_WITHDRAWING/SUCCESS_L1_COMPLETED/FAILED_L2_REJECTED

l2RejectCode

string

false

none

L2 reject error code. Exists when status=FAILED_L2_REJECTED

l2RejectReason

string

false

none

L2 reject reason. Exists when status=FAILED_L2_REJECTED

l1ConfirmedTx

false

none

L1 transaction information

l1ConfirmedTime

string(int64)

false

none

L1 transaction confirmation time

l1CompletedTx

false

none

L1 transaction information

l1CompletedEthAddress

string

false

none

L1 withdrawal completion ETH address

l1CompletedTime

string(int64)

false

none

L1 withdrawal completion time

l1RejectedReasonCode

string

false

none

L1 rejection reason code

l1RejectedReasonMsg

string

false

none

L1 rejection reason message

riskSignature

false

none

L2 signature information

transferOutId

string(int64)

false

none

Transfer out order ID

createdTime

string(int64)

false

none

Creation time

updatedTime

string(int64)

false

none

Update time

Enum Values

Property
Value

status

CROSS_WITHDRAW_UNKNOWN

status

CROSS_WITHDRAW_PENDING_RISK_CHECKING

status

CROSS_WITHDRAW_PENDING_CHECKING

status

CROSS_WITHDRAW_SUCCESS_SUBMIT_CENSOR

status

CROSS_WITHDRAW_PENDING_CENSOR_CHECKING_ACCOUNT

status

CROSS_WITHDRAW_PENDING_CENSORING

status

CROSS_WITHDRAW_PENDING_L2_APPROVING

status

CROSS_WITHDRAW_PENDING_L1_SUBMIT

status

CROSS_WITHDRAW_PENDING_L1_CONFIRMING

status

CROSS_WITHDRAW_SUCCESS

status

CROSS_WITHDRAW_FAILED_RISK_CHECK_FAILURE

status

CROSS_WITHDRAW_FAILED_TRANSFER_REJECTED

status

CROSS_WITHDRAW_FAILED_CENSOR_CHECKING_ACCOUNT_REJECTED

status

CROSS_WITHDRAW_FAILED_CENSORING

status

CROSS_WITHDRAW_FAILED_L2_REJECTED

status

CROSS_WITHDRAW_FAILED_L1_SUBMIT_REJECTED

status

CROSS_WITHDRAW_FAILED_L1_REJECTED

status

CROSS_WITHDRAW_FAILED_USER_BALANCE_NOT_ENOUGH

status

UNRECOGNIZED

schemal1tx

Name
Type
Required
Constraints
Description
Notes

hash

string

false

none

Transaction hash

index

integer(int32)

false

none

Index of the tx hash

time

string(int64)

false

none

Tx chain timestamp, in milliseconds

blockHeight

string(int64)

false

none

Block height of the tx

schemal2signature

Name
Type
Required
Constraints
Description
Notes

r

string

false

none

Bigint for hex string

s

string

false

none

Bigint for hex string

v

string

false

none

Bigint for hex string

schemaresultgetcrosswithdrawsigninfo

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Get information required for cross-chain withdrawal signature - Response

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemagetcrosswithdrawsigninfo

Name
Type
Required
Constraints
Description
Notes

lpAccountId

string

false

none

LP account ID for L2 receiving user transfers

crossWithdrawL2Key

string

false

none

L2 key for fast withdrawal account

crossWithdrawMaxAmount

string

false

none

Maximum amount for fast cross-chain withdrawal

fee

string

false

none

Transaction fee

schemaresultlistnormalwithdraw

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Correct response data

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemanormalwithdraw

Name
Type
Required
Constraints
Description
Notes

id

string(int64)

false

none

Withdrawal order ID

userId

string(int64)

false

none

User ID

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Collateral coin ID

amount

string

false

none

Withdrawal amount

ethAddress

string

false

none

ETH address for withdrawal, may differ from the account's ETH address.

clientWithdrawId

string

false

none

Client-defined ID for idempotent checks

l2Nonce

string(int64)

false

none

L2 signature nonce. First 32 bits of sha256(client_withdraw_id)

l2ExpireTime

string(int64)

false

none

L2 signature expiration time. Unix time in hours, must be at least 24 hours after order creation.

l2Signature

false

none

L2 signature information

status

string

false

none

Normal withdrawal order status

tradeWithdrawId

string(int64)

false

none

Corresponding trading service withdraw order ID

riskSignature

false

none

L2 signature information

l1ConfirmedTx

false

none

L1 transaction information

l1ConfirmedTime

string(int64)

false

none

L1 transaction confirmation time

l1CompletedTime

string(int64)

false

none

L1 withdrawal completion time

createdTime

string(int64)

false

none

Creation time

updatedTime

string(int64)

false

none

Update time

Enum Values

Property
Value

status

NORMAL_WITHDRAW_UNKNOWN

status

NORMAL_WITHDRAW_PENDING_RISK_CHECKING

status

NORMAL_WITHDRAW_PENDING_TRADE_PROCESSING

status

NORMAL_WITHDRAW_PENDING_L2_APPROVING

status

NORMAL_WITHDRAW_PENDING_L1_CONFIRMING

status

NORMAL_WITHDRAW_PENDING_L1_WITHDRAWING

status

NORMAL_WITHDRAW_SUCCESS_L1_COMPLETED

status

NORMAL_WITHDRAW_FAILED_RISK_CHECK_FAILURE

status

NORMAL_WITHDRAW_FAILED_CENSOR_FAILURE

status

NORMAL_WITHDRAW_FAILED_L2_REJECTED

status

UNRECOGNIZED

schemaresultgetnormalwithdrawableamount

| Name | Type Okay, continuing the translated documentation:

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Query normal withdrawable claim amount by user address - Response

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemagetnormalwithdrawableamount

Name
Type
Required
Constraints
Description
Notes

amount

string

false

none

Withdrawable amount

schemaresultcreatecrosswithdraw

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Create cross-chain withdrawal order - Response

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemacreatecrosswithdraw

Name
Type
Required
Constraints
Description
Notes

crossWithdrawId

string(int64)

false

none

Cross-chain withdrawal order ID

schemacreatecrosswithdrawparam

Name
Type
Required
Constraints
Description
Notes

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Coin ID

amount

string

false

none

Withdrawal amount

ethAddress

string

false

none

Withdrawal address. If empty, withdraw to the corresponding address of the current account.

erc20Address

string

false

none

L1 ERC20 contract address for the withdrawn asset

lpAccountId

string

false

none

LP account ID for L2 receiving user transfers

clientCrossWithdrawId

string

false

none

Client-defined ID, used for signature & idempotent check. Must be filled.

expireTime

string(int64)

false

none

Expiration time

l2Signature

string

false

none

L2 signature

fee

string

false

none

Gas + fee obtained from front-end

chainId

string

false

none

Chain ID for withdrawal

mpcAddress

string

false

none

Which mpc address initiated the withdraw

mpcSignature

string

false

none

Signature of the mpc address to the withdraw field

mpcSignTime

string

false

none

mpc signature timestamp,unix timestamp in seconds

createnormalwithdraw

Name
Type
Required
Constraints
Description
Notes

code

string

false

none

Status code

Returns "SUCCESS" for success, otherwise it's a failure.

data

false

none

Create normal withdrawal order - Response

errorParam

object

false

none

Error parameter information

requestTime

string(timestamp)

false

none

Server request receive time

responseTime

string(timestamp)

false

none

Server response return time

traceId

string

false

none

Call trace ID

schemacreatenormalwithdraw

Name
Type
Required
Constraints
Description
Notes

withdrawId

string(int64)

false

none

Withdrawal order ID

schemacreatenormalwithdrawparam

Name
Type
Required
Constraints
Description
Notes

accountId

string(int64)

false

none

Account ID

coinId

string(int64)

false

none

Coin ID

amount

string

false

none

Withdrawal amount

ethAddress

string

false

none

Withdrawal address. If empty, withdraw to the corresponding address of the current account.

clientWithdrawId

string

false

none

Client-defined ID, used for signature & idempotent check. Must be filled.

expireTime

string(int64)

false

none

Expiration time

l2Signature

string

false

none

L2 signature

Last updated