LogoLogo
  • 👋Introduction
  • Get Started
  • Sonic rGEMs Rewards Program
  • Chart Trader
  • Index Price
  • Vaults
    • RabbitX Liquidity Pool Vault
  • Funding Rate
  • Deposit / Withdrawal
  • Fiat Deposits
  • Binance Direct Deposit
  • Profit / Loss Calculation
  • Margin Calculation
  • Market Slippage Protection
  • Liquidations
  • RabbitX Quantower
  • Fees
    • API Fees
  • Frequently Asked Questions
  • Token
    • Explore $RBX
    • Contract Details
  • API Documentation
    • Introduction
    • Rate Limits
    • Generate Your API Keys
      • Signing with API Key
    • Public Endpoints
      • Market Info
      • Trades
      • Orderbook
      • Funding Rate
      • Candles
    • Private Endpoints
      • Account Operations
      • Authentication
      • Orders
      • Fills
      • Positions
      • Profile
      • Balance History
      • Deadman Switch
    • Websocket
      • Trades
      • Orderbook
      • Market Info
      • Account
    • Responses Data Structure
  • Twitter
  • Discord
  • Audit
  • Bug Bounty
  • Bug Bounty Postmortem Report
  • Terms of Use
Powered by GitBook
On this page
  • Get fills
  • Get fills by order id
  1. API Documentation
  2. Private Endpoints

Fills

Get fills

Get account fills. Filter by market or start_time, end_time.

GET /fills
Parameters
{
    market_id: 'BTC-USD'    // (optional)
    start_time: 1669629461258298  // (optional) timestamp in microseconds
    end_time: 1669629461258298  // (optional) timestamp in microseconds
    p_limit: 100, // max rows returned, max 1000
    p_page: 0, // pagination page, index begins at 0
    p_order: "DESC" // default "DESC" for descending and "ASC" for ascending
}
Example response:
{
    "success": true,
    "error": "",
    "result": [
            {'fee': '-0.0178801',
              'id': 'BTC-USD-62581592',
              'is_maker': False,
              'liquidation': False,
              'market_id': 'BTC-USD',
              'order_id': 'BTC-USD@6509736',
              'price': '25543',
              'profile_id': 7615,
              'side': 'short',
              'size': '0.001',
              'timestamp': 1676648452088704,
              'trade_id': 'BTC-USD-62581590'},
             {'fee': '-0.0178801',
              'id': 'BTC-USD-62581571',
              'is_maker': False,
              'liquidation': False,
              'market_id': 'BTC-USD',
              'order_id': 'BTC-USD@6509702',
              'price': '25543',
              'profile_id': 7615,
              'side': 'short',
              'size': '0.001',
              'timestamp': 1676648322405711,
              'trade_id': 'BTC-USD-62581569'}
    ]
}

Tip: Fills are indexed by timestamp; if start_time is not specified, the response will take longer as it will parse through your full order history. Queries with start_time parameter could be up to 10x faster than queries without start_time.

Get fills by order id

Get all account fills for a single order id.

GET /fills/order
Parameters
{
    order_id: 'BTC-USD@445126'  // (required)
}
Example response:
{
    "success": true,
    "error": "",
    "result": [
            {'fee': '-0.0178801',
              'id': 'BTC-USD-62581592',
              'is_maker': False,
              'liquidation': False,
              'market_id': 'BTC-USD',
              'order_id': 'BTC-USD@6509736',
              'price': '25543',
              'profile_id': 7615,
              'side': 'short',
              'size': '0.001',
              'timestamp': 1676648452088704,
              'trade_id': 'BTC-USD-62581590'},
             {'fee': '-0.0178801',
              'id': 'BTC-USD-62581571',
              'is_maker': False,
              'liquidation': False,
              'market_id': 'BTC-USD',
              'order_id': 'BTC-USD@6509702',
              'price': '25543',
              'profile_id': 7615,
              'side': 'short',
              'size': '0.001',
              'timestamp': 1676648322405711,
              'trade_id': 'BTC-USD-62581569'}
    ]
}j
PreviousOrdersNextPositions

Last updated 1 month ago