d": "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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#positiontransactionpage) |
## GET Get Position Transactions By Account ID and Transaction ID
GET /api/v2/private/account/getPositionTransactionById
### Request Parameters
| Name | Type | Required | Description |
| ------------------------- | ------ | -------- | ------------------------ |
| accountId | string | Yes | Account ID |
| positionTransactionIdList | string | Yes | Position Transaction IDs |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#positiontransaction) |
## GET Get Position Term Page by Account ID
GET /api/v2/private/account/getPositionTermPage
### Request Parameters
| Name | Type | Required | Description |
| ------------------------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| accountId | string | Yes | Account ID |
| size | string | No | Number of items to retrieve. Must be greater than 0 and less than or equal to 100 |
| offsetData | string | No | Pagination offset. If empty or not provided, the first page is retrieved |
| filterCoinIdList | string | No | Filter position term records by specified coin IDs. If not provided, all position term records are retrieved |
| filterContractIdList | string | No | Filter position term records by specified contract IDs. If not provided, all position term records are retrieved |
| filterIsLongPosition | string | No | Filter position term records by position direction. If not provided, all position term records are retrieved |
| filterStartCreatedTimeInclusive | 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 | 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
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#positionterm) |
## GET Get Position By Account ID and Contract ID
GET /api/v2/private/account/getPositionByContractId
### Request Parameters
| Name | Type | Required | Description |
| -------------- | ------ | -------- | ---------------------- |
| accountId | string | Yes | Account ID |
| contractIdList | string | Yes | Specified contract IDs |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | Inline |
### Response Data Structure
## GET Get Collateral Transaction Page by Account ID
GET /api/v2/private/account/getCollateralTransactionPage
### Request Parameters
| Name | Type | Required | Description |
| ------------------------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| accountId | string | Yes | Account ID |
| size | string | No | Number of items to retrieve. Must be greater than 0 and less than or equal to 100 |
| offsetData | string | No | Pagination offset. If empty or not provided, the first page is retrieved |
| filterCoinIdList | string | No | Filter collateral transaction records by specified coin IDs. If not provided, all collateral transaction records are retrieved |
| filterTypeList | string | No | Filter collateral transaction records by specified transaction types. If not provided, all collateral transaction records are retrieved |
| filterStartCreatedTimeInclusive | 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 | 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
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | Inline |
### Response Data Structure
## GET Get Collateral Transactions By Account ID and Transaction ID
GET /api/v2/private/account/getCollateralTransactionById
### Request Parameters
| Name | Type | Required | Description |
| --------------------------- | ------ | -------- | -------------------------- |
| accountId | string | Yes | Account ID |
| collateralTransactionIdList | string | Yes | Collateral Transaction IDs |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | Inline |
### Response Data Structure
## GET Get Collateral By Account ID and Coin ID
GET /api/v2/private/account/getCollateralByCoinId
### Request Parameters
| Name | Type | Required | Description |
| ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------- |
| accountId | string | Yes | Account ID |
| coinIdList | string | Yes | Filter collateral information by specified coin IDs. If not provided, all collateral information is retrieved |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | Inline |
### Response Data Structure
## GET Get Account Page by User ID
GET /api/v2/private/account/getAccountPage
### Request Parameters
| Name | Type | Required | Description |
| ---------- | ------ | -------- | --------------------------------------------------------------------------------- |
| size | string | No | Number of items to retrieve. Must be greater than 0 and less than or equal to 100 |
| offsetData | string | No | Pagination offset. If empty or not provided, the first page is retrieved |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#schemaresultaccount) |
## GET Get Account Deleverage Light
GET /api/v2/private/account/getAccountDeleverageLight
### Request Parameters
| Name | Type | Required | Description |
| --------- | ------ | -------- | ----------- |
| accountId | string | Yes | Account ID |
> Response Example
> 200 Response
```json
{
"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 | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1) | successful response | [Result](#getaccountdeleveragelight) |
## GET Get Account By Account ID
GET /api/v2/private/account/getAccountById
### Request Parameters
| Name | Type | Required | Description |
| --------- | ------ | -------- | ----------- |
| accountId | string | Yes | Account ID |
> Response Example
> 200 Response
```json
{
"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 |
| ----------- | ------------------------------------------------------- | ------------------- | ----------프로젝트로 돌아가기