Account Endpoints
Account Information
Path: /api/v1/account/balance
Method: GET
Description: Query account information
Parameters:
Response:
ββ code: Number
ββ msg: String
ββ data: Object
ββ totalWalletBalance: String (total wallet balance, only for USDT asset)
ββ totalUnrealizedProfit: String (total unrealized profit, only for USDT asset)
ββ totalMarginBalance: String (total margin balance, only for USDT asset)
ββ totalPositionMargin: String (initial margin required for positions with current mark price, only for USDT asset)
ββ totalFrozenMargin: String (initial margin required for open orders with current mark price, only for USDT asset)
ββ totalFrozenMoney: String (total frozen money, only for USDT asset)
ββ totalAvailableBalance: String (available balance, only for USDT asset)
ββ assets: Array
ββ asset: String
ββ walletBalance: String (wallet balance)
ββ unrealizedProfit: String (unrealized profit)
ββ marginBalance: String (margin balance)
ββ positionMargin: String (total initial margin required with current mark price)
ββ frozenMargin: String (initial margin required for open orders with current mark price)
ββ frozenMoney: String (frozen money)
ββ availableBalance: String (available balance)
ββ updateTime: Number
Example:
Request:
https://api.aboard.exchange/arbitrum/api/v1/account/balance
Response:
{
"code": 0,
"msg": "",
"data": {
"totalWalletBalance": "23.72469206",
"totalUnrealizedProfit": "0.00000000",
"totalMarginBalance": "23.72469206",
"totalPositionMargin": "0.00000000",
"totalFrozenMargin": "0.00000000",
"totalFrozenMoney": "0.00000000",
"totalAvailableBalance": "23.72469206",
"assets": [
{
"asset": "USDT",
"walletBalance": "23.72469206",
"unrealizedProfit": "0.00000000",
"marginBalance": "23.72469206",
"positionMargin": "0.00000000",
"frozenMargin": "0.00000000",
"frozenMoney": "0.00000000",
"availableBalance": "23.72469206",
"updateTime": 1625474304765
}
]
}
}
Query Position
Path: /api/v1/account/positions
Method: GET
Description: Query position
Parameters:
ββ symbol: String
Response:
ββ code: Number
ββ msg: String
ββ data: Array
ββ symbol: String
ββ positionSide: String
ββ marginType: String (margin mode:ISOLATED/CROSSED)
ββ positionAmt: String (Position quantity. The symbol represents the long and short direction. Positive numbers are many and negative numbers are empty)
ββ availableAmt: String (Open position quantity)
ββ leverage: String
ββ openPrice: String
ββ unRealizedProfit: String (Unrealized profits and losses of positions)
ββ positionMargin: String (Position margin)
ββ isAutoAddMargin: String (If increase margin when Isolated)
ββ isolatedMargin: String (Isolated margin)
ββ markPrice: String (Mark price)
ββ liquidationPrice: String (Liquidation price)
ββ marginRate: String (Margin rate)
ββ updateTime: Number
Example:
Request:
https://api.aboard.exchange/arbitrum/api/v1/account/positions?symbol=ETH-USDC
Response:
{
"code": 0,
"msg": "",
"data": [
{
"symbol": "ETH-USDC",
"positionSide": "NET",
"marginType": "CROSSED",
"positionAmt": "-234.78",
"availableAmt": "200",
"leverage": "10",
"openPrice": "0.00000",
"unRealizedProfit": "0.00",
"positionMargin": "0.00",
"isAutoAddMargin": "false",
"isolatedMargin": "0.00",
"markPrice": "6679.50671178",
"liquidationPrice": "0",
"marginRate": "0",
"updateTime": 1625474304765
}
]
}
Get Income History
Path: /api/v1/account/bills
Method: GET
Description: Get income history
Parameters:
ββ symbol: String
ββ billType: String (DEPOSIT, WITHDRAW, REALIZED_PNLοΌFUNDING_FEE, COMMISSION, LIQUIDATION)
ββ startTime: Number
ββ endTime: Number
ββ limit: Number (Number of result sets returned, default:100 maximum:500)
Response:
ββ code: Number
ββ msg: String
ββ data: Array
ββ symbol: String (trade symbol, if existing)
ββ billType: String (income type)
ββ amount: String (income amount)
ββ asset: String (income asset)
ββ info: String (extra information)
ββ insertTime: Number
ββ id: String (trade id)
Example:
Request:
https://api.aboard.exchange/arbitrum/api/v1/account/bills?symbol=ETH-USDC&billType=REALIZED_PNL&startTime=1628575642000&endTime=1628585642000&limit=100
Response:
{
"code": 0,
"msg": "",
"data": [
{
"symbol": "ETH-USDC",
"billType": "REALIZED_PNL",
"amount": "-0.37500000",
"asset": "USDT",
"info": "REALIZED_PNL",
"insertTime": 1570608000000,
"id": "9689322392"
}
]
}
User Commission Rate
Path: /api/v1/account/commissionRate
Method: GET
Description: Query user commission rate
Parameters:
ββ symbol: String
Response:
ββ code: Number
ββ msg: String
ββ data: Object
ββ symbol: String
ββ makerCommissionRate: String (maker commission rate)
ββ takerCommissionRate: String (taker commission rate)
Example:
Request:
https://api.aboard.exchange/arbitrum/api/v1/account/commissionRate?symbol=ETH-USDC
Response:
{
"code": 0,
"msg": "",
"data": {
"symbol": "",
"makerCommissionRate": "0.0002",
"takerCommissionRate": "0.0004",
"withdrawFee": "5"
}
}
Deposit
Web3 interaction. Refer to SDK.
Withdraw
- Path: /api/v1/account/withdraw
- Method: POST
- Description: Withdraw
- Body:
ββ asset: String (Mandatory)
ββ amount: Number (Mandatory)
ββ destination: String (Mandatory) (Must be the same address with your account. )
Requests Web3 contract function params.
Response:
ββ code: Number
ββ msg: String
ββ data: Object # Web3 contract function params
ββwithdrawId: String
ββexpiringTimestamp: Number
ββsignature: String
ββ r: String
ββ s: String
ββ v: String
Example:
Request:
```
{
"asset": "USDC",
"amount": "1000",
"destination": "0x2222..."
}
```
Response:
```
{
'code': 0,
'msg': '',
'data': {
'withdrawId': '50211378',
'signature': {
'r': '0x32951xxxx',
's': '0x662e7xxxx',
'v': '0x1c'},
'expiringTimestamp': 1672718184}
}
```
Then call the Web3 contract function to withdraw. Please refer to the method in SDK.
Last updated