Asset API
My Assets
GET /api/v1/perpetual/account/assets/{contractCode}
Request Parameters:
Path Parameter
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
contractCode | y | string | Contractcode |
Query
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
AccessKeyId | y | string | Accesskey | ||
SignatureVersion | y | string | Version | ||
SignatureMethod | y | string | Signature Method | HmacSHA256 | |
Signature | y | string | Signature | ||
Timestamp | y | string | Timestamp |
{
"nextRewardTimestamp": 86400000,
"accountRights": "211.73425366",
"realizedSurplus": "-1996.67028101",
"unRealizedSurplus": "0",
"orderMargin": "111.32734888",
"positionMargin": "55.30721388",
"env": 0,
"currencyCode": "usdt",
"availableMargin": "45.09969088"
}
Return:
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
currencyCode | y | string | Currency | ||
env | y | int | testing coin or not 0:listing coin,1:testing coin | ||
availableMargin | y | string | Avail.margin | ||
realizedSurplus | y | string | Realized P/L | ||
orderMargin | y | string | Order margin | ||
positionMargin | y | string | Position margin | ||
unRealizedSurplus | y | string | Unrealized P/L | ||
accountRights | y | string | Equity |
Assets
GET /api/v1/perpetual/account/assets
Request Parameters:
Query
Parameter|Mandatory|Type|Description|Default|Value Range ————- | ————- | ————- | ————- | ————- | ————- AccessKeyId|y|string|Accesskey|| SignatureVersion|y|string|Version|| SignatureMethod|y|string|Signature Method||HmacSHA256 Signature|y|string|Signature|| Timestamp|y|string|Timestamp||
Response
[
{
"availableBalance": "9875.254090",
"currencyCode": "USDT",
"env": "0",
"frozenBalance": "0.000000",
"orderMargin": "15.823570",
"positionMargin": "89.352729",
"positionAccountRights": "10456.925390",
"realizedSurplus": "583.993103",
"unRealizedSurplus": "-15.505000"
}
]
Return:
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
availableBalance | y | string | Available balance | ||
currencyCode | y | string | Currency | ||
env | y | int | testing coin or not 0:listing coin,1:testing coin | ||
frozenBalance | y | string | frozen balance(in transfer audit) | ||
orderMargin | y | string | Order margin | ||
positionMargin | y | string | Position margin | ||
positionAccountRights | y | string | Equity | ||
realizedSurplus | y | string | Realized P/L | ||
unRealizedSurplus | y | string | Unrealized P/L |
Transaction History
GET /api/v1/perpetual/bills/deal-record
Request Parameters:
Query
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
AccessKeyId | y | string | Accesskey | ||
SignatureVersion | y | string | Version | ||
SignatureMethod | y | string | Signature Method | HmacSHA256 | |
Signature | y | string | Signature | ||
Timestamp | y | string | Timestamp | ||
startDate | n | long | Start Date | ||
endDate | n | long | End Date | ||
contractCode | n | string | Contractcode | ||
page | n | integer | Page | 1 | |
pageSize | n | integer | PageSize | 20 | |
startId | n | long | Startid | ||
endId | n | long | Endid |
Response
{
"code": 200,
"data": {
"data": [
{
"amount": "6",
"contractCode": "btcusdt",
"createDate": "2021-11-14 20:52:03",
"currencyCode": "usdt",
"dealType": 1,
"detailSide": "close_long",
"fee": "1.3579752900000000",
"id": "666746374653476864",
"makerTaker": "maker",
"orderId": 125090120907072,
"price": "64665.4900000000000000",
"profit": "0.9555748956901509",
"refOrderId": 125090122965326,
"size": "3879.9294000000000000",
"userId": "2000011"
}
],
"pageNum": 1,
"pageSize": 20,
"totalCount": 112677
},
"msg": "success"
}
Return:
Parameter | Mandatory | Type | Description | Default | Value Range |
---|---|---|---|---|---|
amount | y | string | Transaction amount | ||
contractCode | y | string | Contractcode | ||
createDate | y | string | Creation time | ||
currencyCode | y | string | Currency | ||
dealType | y | string | TransactionType,1:Self-match,2:Deal with other users | ||
detailSide | y | string | Side | ||
fee | y | string | Fee | ||
id | y | long | TransactionHistoryid | ||
makerTaker | y | string | maker or taker | ||
orderId | y | long | Orderid | ||
price | y | string | Transaction price | ||
profit | y | string | Profit | ||
refOrderId | y | long | ReferOrderid | ||
size | y | string | Transaction Value | ||
userId | y | long | uid |