Skip to main content
POST
/
account
curl --request POST \
  --url https://exchange-api2.bulk.trade/api/v1/account \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "fullAccount",
  "user": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
}
'
[
  {
    "fullAccount": {
      "positions": [
        {
          "coin": "<string>",
          "size": 123,
          "price": 123,
          "realizedPnl": 123,
          "leverage": 123
        }
      ],
      "openOrders": [
        {
          "symbol": "<string>",
          "orderId": "<string>",
          "price": 123,
          "originalSize": 123,
          "size": 123,
          "filledSize": 123,
          "vwap": 123,
          "isBuy": true,
          "maker": true,
          "reduceOnly": true,
          "tif": "gtc",
          "status": "placed",
          "timestamp": 123
        }
      ],
      "marginSummary": {
        "positions": [
          {
            "coin": "<string>",
            "size": 123
          }
        ]
      },
      "settings": {
        "maxLeverage": [
          [
            "BTC-USD",
            5
          ]
        ]
      }
    }
  }
]

Request Examples

{
  "type": "fullAccount",
  "user": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
}

Response Schemas

Full Account Response

{
  "fullAccount": {
    "positions": [
      {
        "coin": "BTC-USD",
        "size": 0.5,
        "price": 100000.0,
        "realizedPnl": 500.0,
        "leverage": 5.0
      }
    ],
    "openOrders": [
      {
        "symbol": "BTC-USD",
        "orderId": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
        "price": 102000.0,
        "originalSize": 0.1,
        "size": 0.1,
        "filledSize": 0.0,
        "vwap": 0.0,
        "isBuy": true,
        "maker": true,
        "reduceOnly": false,
        "tif": "gtc",
        "status": "placed",
        "timestamp": 1763316177219383423
      }
    ],
    "marginSummary": {
      "positions": [
        { "coin": "USDC", "size": 100000.0 }
      ]
    },
    "settings": {
      "maxLeverage": [
        ["BTC-USD", 5.0],
        ["ETH-USD", 3.0]
      ]
    }
  }
}

Closed Positions Response

[
  {
    "positions": {
      "owner": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "symbol": "BTC-USD",
      "maxQuantity": 0.5,
      "totalVolume": 1.0,
      "avgOpenPrice": 99000.0,
      "avgClosePrice": 101000.0,
      "realizedPnl": 1000.0,
      "fees": 20.0,
      "funding": 5.0,
      "openTime": 1763310000000000000,
      "closeTime": 1763316177219383423,
      "closeReason": "normal"
    }
  }
]
Close Reason Values:
  • normal - Manually closed by user
  • liquidation - Closed due to liquidation
  • adl - Closed due to auto-deleveraging

Funding History Response

[
  {
    "fundingPayment": {
      "owner": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7",
      "symbol": "BTC-USD",
      "size": 0.5,
      "payment": 12.50,
      "fundingRate": 0.0001,
      "markPrice": 100000.0,
      "slot": 123456789,
      "timestamp": 1763316177219383423
    }
  }
]
Payment Field:
  • Positive = received funding
  • Negative = paid funding

Order History Response

[
  {
    "orderHistory": {
      "orderId": "Fpa3oVuL3UzjNANAMZZdmrn6D1Zhk83GmBuJpuAWG51F",
      "symbol": "BTC-USD",
      "side": "buy",
      "orderType": "limit",
      "tif": "gtc",
      "price": 100000.0,
      "vwap": 100025.0,
      "originalSize": 0.1,
      "executedSize": 0.1,
      "reduceOnly": false,
      "status": "filled",
      "reason": null,
      "slot": 123456789,
      "timestamp": 1763316177219383423
    }
  }
]
Terminal Status Values:
  • filled - Fully filled
  • partiallyFilled - Partially filled
  • cancelled - Cancelled by user
  • cancelledRiskLimit - Risk limit exceeded
  • cancelledSelfCrossing - Self-trade prevention
  • cancelledReduceOnly - Would increase position
  • cancelledIOC - IOC expired
  • rejectedInvalid - Invalid parameters
  • rejectedRiskLimit - Risk limit on submission
  • rejectedCrossing - Post-only would cross
  • rejectedDuplicate - Duplicate order ID

Real-time Updates

For real-time account updates, use the WebSocket account stream.
{
  "method": "subscribe",
  "subscription": [{
    "type": "account",
    "user": "FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"
  }]
}

Body

application/json

Account query parameters (no signature needed)

type
enum<string>
required

Type of account data to retrieve

Available options:
fullAccount,
openOrders,
fills,
positions,
fundingHistory,
orderHistory
user
string
required

User public key (base58)

Example:

"FuueqefENiGEW6uMqZQgmwjzgpnb85EgUcZa5Em4PQh7"

Response

Successful response

fullAccount
object

Complete account state