NAV navbar
logo

Bitpanda Exchange Public Documentation

version v1
baseUri https://api.exchange.bitpanda.com/public/v1
protocols HTTPS
mediaType application/json

Documentation Build Notes

Generated on: 2019-08-08 14:10 UTC

Build version: 326177

Websocket API

Endpoints

Public Bitpanda Exchange Websocket API provides real-time market data feeds from:

wss://streams.exchange.bitpanda.com

Connectivity

A single web socket connection is only valid for 24 hours. After that the server will send out a message announcing a pending connection termination:

{
"subscription": "SYSTEM",
"time": "2019-01-01T01:01:01Z",
"channel_name": "SYSTEM",
"type": "CONNECTION_CLOSING"
}

There is a short grace period for the client to react by re-connecting and re-subscribing to the server. If no action is taken, then the server will close the connection with the status code 1000 and the reason PLEASE_RECONNECT.

Websocket clients must not send the Origin header when connecting. Otherwise, the handshake may fail and display a 403 Forbidden response.

Subscription Channels

Summary of publicly-available subscription channels:

Channel NameDescriptionAvailability
ORDER_BOOKprice level feed delivering all bids and asks followed by incremental changespublic
PRICE_TICKStrading feed delivering all matched prices as they happenpublic
CANDLESTICKScandlesticks feed delivering the desired time granularity for requested instrumentspublic
MARKET_TICKERmarket stats feedpublic

A client may compose the above channels into a single websocket feed in any order or simply subscribe to all channels at once. However, only one subscription per channel is allowed.

Summary of authenticated subscription channels:

Channel NameDescriptionAvailability
ACCOUNT_HISTORYauthenticated private feed delivering trading and funding activityauthenticated

Protocol

Subscribe

All messages are expected and delivered in strict JSON format. When a client wishes to initiate a subscription to one or more channels, a subscribe message is composed and sent to the endpoint. The detailed subscribe payloads are documented in the corresponding sections.

As an example, the following subscribe message activates the Order Book Channel and the Price Tick Channel.

{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "ORDER_BOOK",
    "instrument_codes": [
      "BTC_EUR",
      "BTC_USDT"
    ]
  },
  {
    "name": "PRICE_TICKS",
    "instrument_codes": [
      "BTC_EUR",
      "BTC_USDT"
    ]
  }
]
}

Confirmation

If the subscriptions have been successful two responses are returned:

{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "ORDER_BOOK",
    "instrument_codes": [
      "BTC_EUR",
      "BTC_USDT"
    ]
  }
]
}
{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "PRICE_TICKS",
    "instrument_codes": [
      "BTC_EUR",
      "BTC_USDT"
    ]
  }
]
}

Error

If the subscription payload is incorrect the server will return an error in the following format:

{
"error": "MISSING_INSTRUMENTS",
"channel_name":"ORDER_BOOK",
"type":"ERROR"
}

For public-available channels, the web socket connection will stay open on errors if the json payload is not malformed. The authenticated channel will terminate the web socket connection on invalid payloads.

Unsubscribe

A client can send an unsubscribe message when a particular channel should be deactivated.

{
"type": "UNSUBSCRIBE",
"channels": [
  "ORDER_BOOK",
  "PRICE_TICKS"
]
}

Confirmation

If the unsubscribe was successful two responses are returned:

{
"type": "UNSUBSCRIBED",
"channel_name": "ORDER_BOOK"
}
{
"type": "UNSUBSCRIBED",
"channel_name": "PRICE_TICKS"
}

Idle Connections

When there is no new data sent for 10 seconds, you will receive a heartbeat message so you can be sure your connection is still open.

{
"channel_name": "SYSTEM",
"subscription": "SYSTEM",
"time": "2019-04-16T08:38:13.293Z",
"type": "HEARTBEAT"
}

Market Updates

You will receive an update when a new market is added, activated, modified, closed, put in maintenance or suspended. The field state indicates the current state of the market.

{
"subscription": "SYSTEM",
"update": {
  "state": "IN_MAINTENANCE",
  "base": {
    "code": "BTC",
    "precision": 8
  },
  "quote": {
    "code": "EUR",
    "precision": 2
  },
  "amount_precision": 4,
  "market_precision": 2,
  "min_size": "10.0"
},
"channel_name": "SYSTEM",
"type": "MARKET_UPDATES"
}

Account Channel

Description

Authenticated API clients should have access to a stream of account history events corresponding to one account.

Subscribe

In the following example, a client is attempting to create an authenticated subscription. In order for this request to succeed, a valid API token must be provided.

{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "ACCOUNT_HISTORY",
    "api_token": "my-api-token"
  }
]
}

Confirmation

If the authenticated subscription request succeeded, a confirmation is sent back to the client.

{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "ACCOUNT_HISTORY",
    "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6"
  }
]
}

Error

If authentication fails within the initial subscribe message, due to an invalid API token or another reason, the web socket connection terminates with status code 1008 and a reason in the following format:

{
"error" : "INVALID_APIKEY"
}

Active Orders Snapshot

The active orders snapshot returns all active orders. Note that active orders might be partially-filled and thus include trades.

{
"channel_name": "ACCOUNT_HISTORY",
"type": "ACTIVE_ORDERS_SNAPSHOT",
"order": {
  "type": "MARKET",
  "status": "EXECUTED",
  "order_id": "07ba933f-29dc-4ec1-b00f-578cca8c5082",
  "account_id": "f6c74144-9e0d-49f7-8f6e-a8770f3ad77f",
  "instrument_code": "BTC_ETH",
  "time": "2019-03-21T16:38:17.093Z",
  "time_last_updated": "2019-03-21T16:38:18.093Z",
  "side": "BUY",
  "price": "1.0",
  "amount": "1.0",
  "filled_amount": "0.5",
  "sequence": 1
},
"trades": [
  {
    "fee": {
      "fee_amount": "0.0002",
      "fee_currency": "BTC",
      "fee_percentage": "0.1",
      "fee_group_id": "default",
      "fee_type": "TAKER",
      "running_trading_volume": "0.00277069"
    },
    "trade": {
      "trade_id": "6c252d23-2366-40fa-b7a7-ffc6b5cfa74c",
      "order_id": "ff2c75b2-c681-4ffe-ae59-72a6e044eedd",
      "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
      "amount": "0.2",
      "side": "BUY",
      "instrument_code": "BTC_EUR",
      "price": "9786.32",
      "time": "2019-07-01T07:02:51.919Z",
      "sequence": 1000
    }
  }
]
}

Inactive Orders Snapshot

The inactive orders snapshot returns the most recent inactive orders. Inactive orders are those which satisfy one of these criteria:

  1. partially-filled and then cancelled by user.
  2. fully-filled.

Once the order is inactive it can no-longer participate in the market.

{
"channel_name": "ACCOUNT_HISTORY",
"type": "INACTIVE_ORDERS_SNAPSHOT",
"account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
"orders": [
  {
    "order": {
      "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
      "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
      "instrument_code": "BTC_EUR",
      "time": "2019-07-22T07:06:23.073Z",
      "side": "BUY",
      "price": "9441.89",
      "amount": "0.08709",
      "filled_amount": "0.08709",
      "type": "LIMIT",
      "sequence": 11959,
      "status": "FILLED_FULLY",
      "time_last_updated": "2019-07-22T07:06:25.338Z"
    },
    "trades": [
      {
        "fee": {
          "fee_amount": "0.00008709",
          "fee_currency": "BTC",
          "fee_percentage": "0.1",
          "fee_group_id": "default",
          "fee_type": "TAKER",
          "running_trading_volume": "0.00277069"
        },
        "trade": {
          "trade_id": "5a974cdf-4eac-499c-8fa5-2f5b40b3eabd",
          "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
          "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
          "amount": "0.08709",
          "side": "BUY",
          "instrument_code": "BTC_EUR",
          "price": "9441.89",
          "time": "2019-07-22T07:06:24.054Z",
          "sequence": 11959
        }
      }
    ]
  }
]
}

Balances Snapshot

Next, a snapshot of all last-known account balances is returned.

{
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"type": "BALANCES_SNAPSHOT",
"channel_name": "ACCOUNT_HISTORY",
"balances": [
  {
    "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
    "currency_code": "BTC",
    "change": "0.50000000",
    "available": "10.0",
    "locked": "1.1234567",
    "sequence": 1,
    "time": "2019-04-01T13:39:17.155Z"
  },
  {
    "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
    "currency_code": "ETH",
    "change": "0.50000000",
    "available": "10.0",
    "locked": "1.1234567",
    "sequence": 2,
    "time": "2019-04-01T13:39:17.155Z"
  }
]
}

Account Updates

Once the funding overview and trading history have been delivered, all subsequent messages relating to the subscribed account are delivered.

Each account history update is delivered in the following format:

{
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"update": {
  //see message definitions below
 },
"channel_name": "ACCOUNT_HISTORY",
"type": "ACCOUNT_UPDATE"
}

Account Update: Order Created

Emitted after the system has successfully accepted a client's order.

{
"id": "d3fe6025-5b27-4df6-a957-98b8d131cb9d",
"type": "ORDER_CREATED",
"activity": "TRADING",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-08-01T13:39:15.590Z",
"sequence" : 0,
"order": {
  "status": "EXECUTED",
  "order_id": "6f991342-da2c-45c6-8830-8bf519cfc8cc",
  "account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
  "instrument_code": "BTC_EUR",
  "time": "2018-08-01T13:39:15.586Z",
  "side": "SELL",
  "price": 3,
  "amount": 1.5,
  "filled_amount": 0,
  "type": "LIMIT"
},
"locked": {
  "currency_code": "BTC",
  "amount": "1.50000000",
  "new_locked": "2.00000000"
}
}

Account Update: Order Rejected

Emitted after the system establishes that an order could not be processed. The client can expect a reason field detailing the rejection.

{
"id": "d3fe6025-5b27-4df6-a957-98b8d131cb9d",
"type": "ORDER_REJECTED",
"activity": "TRADING",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"sequence": 0,
"timestamp": "2018-08-01T13:39:15.590Z",
"reason": "INSUFFICIENT_FUNDS",
"order_id": "6f991342-da2c-45c6-8830-8bf519cfc8cc",
"unlocked": {
  "currency_code": "BTC",
  "amount": "1.50000000",
  "new_locked": "2.00000000"
}
}

Account Update: Trade Settled

Emitted after an open order leads to a trade.

{
"account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
"sequence": 11959,
"update": {
  "type": "TRADE_SETTLED",
  "activity": "TRADING",
  "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
  "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
  "time": "2019-07-22T07:06:25.338Z",
  "filled_amount": "0.08709",
  "trade": {
    "trade_id": "5a974cdf-4eac-499c-8fa5-2f5b40b3eabd",
    "order_id": "43394171-9e79-4c61-ba19-61e33365c29a",
    "account_id": "379a12c0-4560-11e9-82fe-2b25c6f7d123",
    "amount": "0.08709",
    "side": "BUY",
    "instrument_code": "BTC_EUR",
    "price": "9441.89",
    "time": "2019-07-22T07:06:24.054Z"
  },
  "fee": {
    "fee_amount": "0.00008709",
    "fee_currency": "BTC",
    "fee_percentage": "0.1",
    "fee_group_id": "default",
    "fee_type": "TAKER",
    "running_trading_volume": "0.00277069"
  },
  "credited": {
    "currency_code": "BTC",
    "amount": "0.08700291",
    "new_available": "5799.28515760231",
    "new_locked": "0.00578889"
  },
  "spent": {
    "currency_code": "EUR",
    "amount": "822.2942001",
    "new_available": "15392991.0630611928781",
    "new_locked": "4000.47725"
  },
  "unlocked": {
    "currency_code": "EUR",
    "amount": "0.0",
    "new_available": "15392991.0630611928781",
    "new_locked": "4000.47725"
  },
  "id": "7a5adc0a-c287-4136-8667-d13a7f2607c7",
  "sequence": 11959
},
"channel_name": "ACCOUNT_HISTORY",
"type": "ACCOUNT_UPDATE"
}

Account Update: Order Closed

Emitted after an open order is closed.

{
"id": "c2373ec1-a2da-4e48-baa2-dfb774802342",
"type": "ORDER_CLOSED",
"activity": "TRADING",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-08-01T13:39:05.773Z",
"order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
"sequence": 0,
"credited": {
  "currency_code": "EUR",
  "amount": "1.50",
  "new_balance": "5.00"
},
"unlocked": {
  "currency_code": "EUR",
  "amount": "1.50",
  "new_locked": "0.00"
}
}

Account Update: Stop Order Triggered

Emitted after a stop order has been triggered.

{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "TRADING",
"type": "STOP_ORDER_TRIGGERED",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-12-04T11:32:46.435Z",
"order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
"sequence": 0
}

Account Update: Market Order Filled

Emitted after a market order has been filled.

{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "TRADING",
"type": "MARKET_ORDER_FILLED",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-12-04T11:32:46.435Z",
"order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
"sequence": 0,
"filled_amount": "300.00",
"unlocked": {
  "currency_code": "EUR",
  "amount": "1.50",
  "new_locked": "0.00"
}
}

Account Update: Order Processing Failed

Emitted after an order fails.

{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "TRADING",
"type": "ORDER_PROCESSING_FAILED",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-12-04T11:32:46.435Z",
"order_id": "025293a1-53d8-4a08-996b-2132a18721dc",
"sequence": 0,
"unlocked": {
  "currency_code": "BTC",
  "amount": "1.00000000",
  "new_locked": "1.00000000"
}
}

Account Update: Funds Deposited

Emitted after a user has successfully deposited funds.

{
"id": "6d999374-760e-4ad3-95d5-bb47f86194dd",
"activity": "FUNDING",
"type": "FUNDS_DEPOSITED",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-08-01T13:38:46.435Z",
"sequence": 0,
"credited": {
  "currency_code": "BTC",
  "amount": "0.00000001",
  "new_balance": "1.00000001"
},
"transaction": {
  "transaction_id": "d4f11100-6116-11e9-afa4-2dfff0b4b9c8",
  "transaction_id_prefix": "C"
}
}

Account Update: Funds Withdrawn

Emitted after a user has successfully withdrawn funds.

{
"id": "6d999374-760e-4ad3-95d5-bb47f86194dd",
"activity": "FUNDING",
"type": "FUNDS_WITHDRAWN",
"account_id": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-08-01T13:38:46.435Z",
"sequence": 0,
"deducted": {
  "currency_code": "BTC",
  "amount": "0.00000001",
  "new_balance": "1.00000001"
},
"transaction": {
  "transaction_id": "c9c51e30-6116-11e9-a04f-c1648a75fb19",
  "transaction_id_prefix": "F"
}
}

Account Update: Fund Withdrawal Failed

Emitted after a user's withdrawal fails.

{
"id": "8c68eba4-877a-4b84-bb2a-4f56715dca0e",
"activity": "FUNDING",
"type": "FUNDS_WITHDRAWN_FAILED",
"accountId": "b355abb8-aaae-4fae-903c-c60ff74723c6",
"timestamp": "2018-12-04T11:32:46.435Z",
"sequence": 0,
"credited": {
  "currency": "BTC",
  "amount": "1.50000000",
  "new_available": "1.50000000",
  "new_locked": "0.00000000"
},
"transaction": {
  "transactionId": "9273228e-c29f-4c2f-a3c8-f92ec2d16886",
  "transactionIdPrefix": "C",
  "reason": "Reason of failed transaction"
}
}

Order Book Channel

Description

Publicly available feed of market data: order book. User has to specify depth of the order book he wishes to be served.

Subscribe

Unauthenticated access to any number of order books backed by instruments can be specified in the request. Depth of the displayed order book has to be defined and can be anything in range of 1-250.

{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "ORDER_BOOK",
    "depth": 50
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Confirmation

{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "ORDER_BOOK",
    "depth": 50
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Order Book Snapshot

On subscribe, the most recent compiled order book snapshot is sent back.

An order book entry is defined as a tuple of price and amount.

[
"123.456",
"0.12345678"
]

Full message example:

{
"type": "ORDER_BOOK_SNAPSHOT",
"name": "ORDER_BOOK",
"instrument_code": "BTC_EUR",
"bids": [
  [
    "6500.11",
    "0.45054140"
  ]
],
"asks": [
  [
    "6500.15",
    "0.57753524"
  ]
]
}
{
"type": "ORDER_BOOK_SNAPSHOT",
"name": "ORDER_BOOK",
"instrument_code": "ETH_EUR",
"bids": [
  [
    "500.11",
    "0.45054140"
  ]
],
"asks": [
  [
    "500.15",
    "0.57753524"
  ]
]
}

Order Book Updates

Whenever a subscribed order book gets modified, a list of changes is emitted.

{
"type": "ORDER_BOOK_UPDATE",
"name": "ORDER_BOOK"  
"instrument_code": "BTC_EUR",
"changes": [
  [
    "BUY",
    "6500.09",
    "0.84702376"
  ],
  [
    "SELL",
    "6507.00",
    "1.88933140"
  ],
  [
    "SELL",
    "6505.54",
    "1.12386524"
  ],
  [
    "SELL",
    "6504.38",
    "0"
  ]
]
}

Note that the amount always specifies the actual amount and not the delta. If the amount is set to 0 it means that the price level has been removed.

Price Tick Channel

Description

Publicly available feed of market data: price ticks.

Subscribe

Unauthenticated access to any number of instruments that can be specified in the request.

{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "PRICE_TICKS",
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Confirmation

{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "PRICE_TICKS",
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Market History

A market history of the most recent price ticks is sent back.

{
  "type": "PRICE_TICK_HISTORY",
  "channel_name": "PRICE_TICKS",
  "instrument_code": "BTC_EUR",
  "history": [...]
}

Price Ticks

Whenever an order match happens a new price tick is emitted.

{
"type": "PRICE_TICK",
"channel_name": "PRICE_TICKS",
"instrument_code": "BTC_EUR",
"price": "6500.11",
"amount": "1.01",
"best_bid": "6500.00",
"best_ask": "6500.11",
"taker_side": "SELL",
"time": "2018-07-16T12:04:24.790Z"
}

{
"type": "PRICE_TICK",
"channel_name": "PRICE_TICKS",
"instrument_code": "ETH_EUR",
"price": "500.11",
"amount": "1.01",
"best_bid": "500.00",
"best_ask": "500.11",
"taker_side": "BUY",
"time": "2018-07-16T12:04:24.790Z"
}

Candlestick Channel

Description

Publicly available feed of market data: candlesticks.

Subscribe

Unauthenticated access to any number of instrument and time granularity pairs can be specified in the subscription request.

Valid values for time granularity are:

UnitPeriod
MINUTES1
MINUTES5
MINUTES15
MINUTES30
HOURS1
HOURS4
DAYS1
WEEKS1
MONTHS1
{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "CANDLESTICKS",
    "properties": [
      {
        "instrument_code": "BTC_EUR",
        "time_granularity": {
          "unit": "MINUTES",
          "period": 1
        }
      },
      {
        "instrument_code": "ETH_EUR",
        "time_granularity": {
          "unit": "MINUTES",
          "period": 5
        }
      },
      {
        "instrument_code": "ETH_EUR",
        "time_granularity": {
          "unit": "MINUTES",
          "period": 15
        }
      },
      {
        "instrument_code": "BTC_EUR",
        "time_granularity": {
          "unit": "HOURS",
          "period": 1
        }
      }
    ]
  }
]
}

Confirmation

Confirmation message for the candlesticks subscription.

{
"channels": [
  {
    "properties": [
      {
        "instrument_code": "BTC_USD",
        "time_granularity": {
          "unit": "MINUTES",
          "period": 1
        }
      },
      {
        "instrument_code": "BTC_EUR",
        "time_granularity": {
          "unit": "MINUTES",
          "period": 15
        }
      }
    ],
    "name": "CANDLESTICKS"
  }
],
"type": "SUBSCRIPTIONS"
}

Candlesticks Snapshot

On subscribe, the latest intermediate candlesticks for all specified instrument and time granularity pairs are sent. If there is no intermediate candle then no snapshot is returned.

{
"instrument_code": "BTC_USD",
"granularity": {
  "unit": "MINUTES",
  "period": 1
},
"high": "4123.54",
"low": "4000.12",
"open": "4100.00",
"close": "4000.12",
"volume": "12.3456789",
"time": "2018-12-03T16:25:11.875Z",
"channel_name": "CANDLESTICKS",
"type": "CANDLESTICK_SNAPSHOT"
}

{
"instrument_code": "BTC_EUR",
"granularity": {
  "unit": "MINUTES",
  "period": 5
},
"high": "3910.12",
"low": "3900.12",
"open": "3900.12",
"close": "3900.12",
"volume": "7.7777",
"time": "2018-12-03T16:25:11.875Z",
"channel_name": "CANDLESTICKS",
"type": "CANDLESTICK_SNAPSHOT"
}

Candlesticks Update

Whenever a time period ends, the candlesticks for all specified instrument and time granularity pairs are then pushed as update.

{
"instrument_code": "BTC_EUR",
"granularity": {
  "unit": "MINUTES",
  "period": 1
},
"high": "3500.25",
"low": "3400.25",
"open": "3300.25",
"close": "3200.25",
"volume": "10",
"time": "2018-12-03T16:26:00.003Z",
"channel_name": "CANDLESTICKS",
"type": "CANDLESTICK"
}

Market Tick Channel

Description

Publicly available feed of market data: market ticks. Market ticks provide a client with the following market insights:

  • 24hr volume
  • 24hr high
  • 24hr low
  • 24hr absolute price change
  • 24hr price change percentage

Additionally, there is information detailing how the prices evolved over the last 24hrs.

Subscribe

Unauthenticated access to any number of instruments can be specified in the subscription request.

{
"type": "SUBSCRIBE",
"channels": [
  {
    "name": "MARKET_TICKER",
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Confirmation

{
"type": "SUBSCRIPTIONS",
"channels": [
  {
    "name": "MARKET_TICKER",
    "instrument_codes": [
      "BTC_EUR",
      "ETH_EUR"
    ]
  }
]
}

Ticker Updates

Updates are pushed periodically when there is new information available. If there are no changes, no updates will be pushed.

{
"channel_name": "MARKET_TICKER",
"type": "MARKET_TICKER_UPDATES",
"ticker_updates": [
  {
    "instrument": "BTC_EUR",
    "last_price": "2000",
    "high": "3000",
    "low": "1000",
    "volume": "100000"
  },
  {
    "instrument": "BTC_USD",
    "last_price": "2200",
    "high": "3200",
    "low": "1200",
    "volume": "100000.10"
  }
]
}

Price Updates

Every hour new price updates are pushed with a timestamp. If available, a maximum of 24 price points will be pushed.

{
"channel_name": "MARKET_TICKER",
"type": "PRICE_POINT_UPDATES",
"price_updates": [
  {
    "instrument": "BTC_EUR",
    "prices": [
      {
        "time": "2019-03-01T08:59:59.999Z",
        "close_price": "3580.6"
      },
      {
        "time": "2019-03-01T09:59:59.999Z",
        "close_price": "3590.6"
      }
    ]
  },
  {
    "instrument": "BTC_USD",
    "prices": [
      {
        "time": "2019-03-01T08:59:59.999Z",
        "close_price": "3982.38"
      },
      {
        "time": "2019-03-01T09:59:59.999Z",
        "close_price": "3987.22"
      },
      {
        "time": "2019-03-01T10:59:59.999Z",
        "close_price": "3996.54"
      },
      {
        "time": "2019-03-01T11:59:59.999Z",
        "close_price": "3986.33"
      },
      {
        "time": "2019-03-01T12:59:59.999Z",
        "close_price": "3983.63"
      },
      {
        "time": "2019-03-01T13:59:59.999Z",
        "close_price": "3987.82"
      },
      {
        "time": "2019-03-01T14:59:59.999Z",
        "close_price": "3996.0"
      },
      {
        "time": "2019-03-01T15:59:59.999Z",
        "close_price": "3997.56"
      },
      {
        "time": "2019-03-01T16:59:59.999Z",
        "close_price": "4008.56"
      },
      {
        "time": "2019-03-01T17:59:59.999Z",
        "close_price": "4015.18"
      },
      {
        "time": "2019-03-01T18:59:59.999Z",
        "close_price": "4004.31"
      },
      {
        "time": "2019-03-01T19:59:59.999Z",
        "close_price": "4008.7"
      },
      {
        "time": "2019-03-01T20:59:59.999Z",
        "close_price": "4008.1"
      },
      {
        "time": "2019-03-01T21:59:59.999Z",
        "close_price": "4006.22"
      },
      {
        "time": "2019-03-01T22:59:59.999Z",
        "close_price": "4008.84"
      },
      {
        "time": "2019-03-01T23:59:59.999Z",
        "close_price": "4015.72"
      },
      {
        "time": "2019-03-02T00:59:59.999Z",
        "close_price": "3987.97"
      },
      {
        "time": "2019-03-02T01:59:59.999Z",
        "close_price": "3990.19"
      },
      {
        "time": "2019-03-02T02:59:59.999Z",
        "close_price": "3987.96"
      },
      {
        "time": "2019-03-02T03:59:59.999Z",
        "close_price": "3992.21"
      },
      {
        "time": "2019-03-02T04:59:59.999Z",
        "close_price": "3995.47"
      },
      {
        "time": "2019-03-02T05:59:59.999Z",
        "close_price": "4000.15"
      },
      {
        "time": "2019-03-02T06:59:59.999Z",
        "close_price": "3999.31"
      },
      {
        "time": "2019-03-02T07:54:17.915Z",
        "close_price": "4011.01"
      }
    ]
  }
]
}

Rest API

Endpoints

Public Bitpanda Exchange REST API provides endpoints for account and order management. Additionally, public market data can be retrieved.

https://api.exchange.bitpanda.com/public/v1

Connectivity

The Bitpanda Exchange REST API is rate limited. Sending too many requests in a short period will result in blocked requests with HTTP status 429.

Private endpoints

To access account specific data, an API key must be sent in the HTTP header Authorization as a Bearer token.

Authorization: Bearer apiKey

An API key can be generated through the user interface.

Errors

Valid requests will result in responses with HTTP 2xx status codes. Every other response in the HTTP 4xx range will return a well defined error in the HTTP body in the following format:

{
"error":"MESSAGE"
}

Types

Amount

A decimal monetary amount of a currency.

TYPE DEFINITION

{
  "name": "Amount",
  "type": "string",
  "description": "A decimal monetary amount of a currency."
}

TYPE EXAMPLE

6345.234

MarketTime

Zoned date time value which adheres to RFC3339. All market times are in UTC.

TYPE DEFINITION

{
  "name": "MarketTime",
  "type": "datetime",
  "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC."
}

TYPE EXAMPLE

2017-10-05T16:01:41.090Z

AccountSequence

Global monotonically-increasing numerical sequence bound to account activity.

TYPE DEFINITION

{
  "name": "AccountSequence",
  "type": "number",
  "description": "Global monotonically-increasing numerical sequence bound to account activity."
}

Currency


Properties

code

Currency code

PropertyValue
requiredtrue
typestring

precision

Precision the currency is traded with

PropertyValue
requiredtrue
typeinteger

TYPE DEFINITION

{
  "name": "Currency",
  "type": "object",
  "properties": [
    {
      "type": "string",
      "name": "code",
      "displayName": "code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "Currency code",
      "key": "code"
    },
    {
      "type": "integer",
      "name": "precision",
      "displayName": "precision",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "Precision the currency is traded with",
      "key": "precision"
    }
  ]
}

Instrument

The instrument denotes the exchange of one currency for another. Both base and quote must be valid currency codes.

TYPE DEFINITION

{
  "name": "Instrument",
  "type": "string",
  "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes."
}

TYPE EXAMPLE

BTC_EUR

TimeGranularity

A length of time defined by unit and period used to identify the type of candlestick. Supported resolutions are 1, 5, 15, 30 MINUTES & 1, 4 HOURS & 1 DAYS & 1 WEEKS & 1 MONTHS.


Properties

TYPE DEFINITION

{
  "name": "TimeGranularity",
  "type": "object",
  "description": "A length of time defined by unit and period used to identify the type of __candlestick__. Supported resolutions are 1, 5, 15, 30 MINUTES & 1, 4 HOURS & 1 DAYS & 1 WEEKS & 1 MONTHS.",
  "properties": {
    "unit": {
      "type": "string",
      "name": "unit",
      "displayName": "unit",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "enum": [
        "MINUTES",
        "HOURS",
        "DAYS",
        "WEEKS",
        "MONTHS"
      ]
    },
    "period": {
      "type": "number",
      "name": "period",
      "displayName": "period",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    }
  }
}

Account

Account details of a registered user's balance(s).


Properties

TYPE DEFINITION

{
  "name": "Account",
  "type": "object",
  "description": "Account details of a registered user's balance(s).",
  "properties": {
    "account_id": {
      "type": "string",
      "name": "account_id",
      "displayName": "account_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "account_id"
    },
    "balances": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": [
          {
            "type": "string",
            "name": "currency_code",
            "displayName": "currency_code",
            "typePropertyKind": "TYPE_EXPRESSION",
            "required": true,
            "description": "currency code",
            "key": "currency_code"
          },
          {
            "type": "string",
            "name": "change",
            "displayName": "change",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "orderHint": 0,
            "rawType": {
              "name": "Amount",
              "displayName": "Amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "string"
              ],
              "example": "6345.234",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "structuredExample": {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              },
              "orderHint": 0
            },
            "originalType": "xchg_type.Amount",
            "required": true,
            "examples": [
              {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              }
            ],
            "key": "change"
          },
          {
            "type": "string",
            "name": "available",
            "displayName": "available",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "orderHint": 0,
            "rawType": {
              "name": "Amount",
              "displayName": "Amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "string"
              ],
              "example": "6345.234",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "structuredExample": {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              },
              "orderHint": 0
            },
            "originalType": "xchg_type.Amount",
            "required": true,
            "examples": [
              {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              }
            ],
            "key": "available"
          },
          {
            "type": "string",
            "name": "locked",
            "displayName": "locked",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "orderHint": 0,
            "rawType": {
              "name": "Amount",
              "displayName": "Amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "string"
              ],
              "example": "6345.234",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "structuredExample": {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              },
              "orderHint": 0
            },
            "originalType": "xchg_type.Amount",
            "required": true,
            "examples": [
              {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              }
            ],
            "key": "locked"
          },
          {
            "type": "number",
            "name": "sequence",
            "displayName": "sequence",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "Global monotonically-increasing numerical sequence bound to account activity.",
            "orderHint": 2,
            "rawType": {
              "name": "AccountSequence",
              "displayName": "AccountSequence",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "number"
              ],
              "description": "Global monotonically-increasing numerical sequence bound to account activity.",
              "orderHint": 2
            },
            "originalType": "xchg_type.AccountSequence",
            "required": true,
            "key": "sequence"
          },
          {
            "type": "datetime",
            "name": "time",
            "displayName": "time",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
            "format": "rfc3339",
            "orderHint": 1,
            "rawType": {
              "name": "MarketTime",
              "displayName": "MarketTime",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "datetime"
              ],
              "example": "2017-10-05T16:01:41.090Z",
              "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
              "format": "rfc3339",
              "structuredExample": {
                "value": "2017-10-05T16:01:41.090Z",
                "strict": true,
                "name": null,
                "structuredValue": "2017-10-05T16:01:41.090Z"
              },
              "orderHint": 1
            },
            "originalType": "xchg_type.MarketTime",
            "required": true,
            "examples": [
              {
                "value": "2017-10-05T16:01:41.090Z",
                "strict": true,
                "name": null,
                "structuredValue": "2017-10-05T16:01:41.090Z"
              }
            ],
            "key": "time"
          }
        ],
        "name": "Balance",
        "displayName": "Balance",
        "typePropertyKind": "TYPE_EXPRESSION",
        "description": "Account balance for one single currency",
        "discriminatorValue": null,
        "orderHint": 7,
        "additionalProperties": true,
        "originalType": "xchg_type.Balance"
      },
      "name": "balances",
      "displayName": "balances",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "balances"
    }
  }
}

Balance

Account balance for one single currency


Properties

TYPE DEFINITION

{
  "name": "Balance",
  "type": "object",
  "description": "Account balance for one single currency",
  "properties": {
    "currency_code": {
      "type": "string",
      "name": "currency_code",
      "displayName": "currency_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "currency code"
    },
    "change": {
      "type": "string",
      "name": "change",
      "displayName": "change",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "available": {
      "type": "string",
      "name": "available",
      "displayName": "available",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "locked": {
      "type": "string",
      "name": "locked",
      "displayName": "locked",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "sequence": {
      "type": "number",
      "name": "sequence",
      "displayName": "sequence",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Global monotonically-increasing numerical sequence bound to account activity.",
      "orderHint": 2,
      "rawType": {
        "name": "AccountSequence",
        "displayName": "AccountSequence",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "number"
        ],
        "description": "Global monotonically-increasing numerical sequence bound to account activity.",
        "orderHint": 2
      },
      "originalType": "xchg_type.AccountSequence",
      "required": true
    },
    "time": {
      "type": "datetime",
      "name": "time",
      "displayName": "time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": true,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ]
    }
  }
}

Order


Properties

TYPE DEFINITION

{
  "name": "Order",
  "type": "object",
  "properties": {
    "order_id": {
      "type": "string",
      "name": "order_id",
      "displayName": "order_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "order_id"
    },
    "account_id": {
      "type": "string",
      "name": "account_id",
      "displayName": "account_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "account_id"
    },
    "instrument_code": {
      "type": "string",
      "name": "instrument_code",
      "displayName": "instrument_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
      "pattern": "^[A-Z]+_[A-Z]+$",
      "orderHint": 4,
      "rawType": {
        "name": "Instrument",
        "displayName": "Instrument",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "BTC_EUR",
        "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
        "pattern": "^[A-Z]+_[A-Z]+$",
        "structuredExample": {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        },
        "orderHint": 4
      },
      "originalType": "xchg_type.Instrument",
      "required": true,
      "examples": [
        {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        }
      ],
      "key": "instrument_code"
    },
    "amount": {
      "type": "string",
      "name": "amount",
      "displayName": "amount",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The amount of currency for this order",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "amount"
    },
    "filled_amount": {
      "type": "string",
      "name": "filled_amount",
      "displayName": "filled_amount",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The already filled amount of currency for this order",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "filled_amount"
    },
    "side": {
      "type": "string",
      "name": "side",
      "displayName": "side",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "Direction of the order",
      "enum": [
        "BUY",
        "SELL"
      ],
      "key": "side"
    },
    "type": {
      "type": "string",
      "name": "type",
      "displayName": "type",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The type of the order",
      "enum": [
        "MARKET",
        "LIMIT",
        "STOP"
      ],
      "key": "type"
    },
    "status": {
      "type": "string",
      "name": "status",
      "displayName": "status",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered in __OPEN__ state and is submitted to the order book. If an order validation fails, the order status is updated to __REJECTED__ specifying __reason__ for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to __FAILED__ and the user should re-submit the order.",
      "enum": [
        "OPEN",
        "STOP_TRIGGERED",
        "FILLED",
        "FILLED_FULLY",
        "FILLED_CLOSED",
        "FILLED_REJECTED",
        "REJECTED",
        "CLOSED",
        "FAILED"
      ],
      "key": "status"
    },
    "sequence": {
      "type": "number",
      "name": "sequence",
      "displayName": "sequence",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Global monotonically-increasing numerical sequence bound to account activity.",
      "orderHint": 2,
      "rawType": {
        "name": "AccountSequence",
        "displayName": "AccountSequence",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "number"
        ],
        "description": "Global monotonically-increasing numerical sequence bound to account activity.",
        "orderHint": 2
      },
      "originalType": "xchg_type.AccountSequence",
      "required": false,
      "key": "sequence"
    },
    "price": {
      "type": "string",
      "name": "price",
      "displayName": "price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The price at which the order is set to execute. Applicable to __LIMIT__ and __STOP__ orders.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "price"
    },
    "reason": {
      "type": "string",
      "name": "reason",
      "displayName": "reason",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "Reason specifying why an order was rejected. Only applicable to order status __REJECTED__ and __FILLED_REJECTED__.",
      "enum": [
        "INSUFFICIENT_FUNDS",
        "INSUFFICIENT_LIQUIDITY",
        "SELF_TRADE_PREVENTED"
      ],
      "key": "reason"
    },
    "time": {
      "type": "datetime",
      "name": "time",
      "displayName": "time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The time at which the order was executed.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": true,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ],
      "key": "time"
    },
    "time_last_updated": {
      "type": "datetime",
      "name": "time_last_updated",
      "displayName": "time_last_updated",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The time at which the order was last updated, i.e. the order status changed.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": false,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ],
      "key": "time_last_updated"
    },
    "time_triggered": {
      "type": "datetime",
      "name": "time_triggered",
      "displayName": "time_triggered",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The time at which the __STOP__ order was triggered.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": false,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ],
      "key": "time_triggered"
    },
    "trigger_price": {
      "type": "string",
      "name": "trigger_price",
      "displayName": "trigger_price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The price at which the __STOP__ order is set to trigger conversion into a __LIMIT__ order. Only applicable to __STOP__ orders.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": false,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "trigger_price"
    }
  }
}

OrderBook

A snapshot of the order book state


Properties

TYPE DEFINITION

{
  "name": "OrderBook",
  "type": "object",
  "description": "A snapshot of the order book state",
  "properties": {
    "instrument_code": {
      "type": "string",
      "name": "instrument_code",
      "displayName": "instrument_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
      "pattern": "^[A-Z]+_[A-Z]+$",
      "orderHint": 4,
      "rawType": {
        "name": "Instrument",
        "displayName": "Instrument",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "BTC_EUR",
        "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
        "pattern": "^[A-Z]+_[A-Z]+$",
        "structuredExample": {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        },
        "orderHint": 4
      },
      "originalType": "xchg_type.Instrument",
      "required": true,
      "examples": [
        {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        }
      ],
      "key": "instrument_code"
    },
    "time": {
      "type": "datetime",
      "name": "time",
      "displayName": "time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": true,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ],
      "key": "time"
    },
    "bids": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": []
      },
      "name": "bids",
      "displayName": "bids",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "bids"
    },
    "asks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": []
      },
      "name": "asks",
      "displayName": "asks",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "asks"
    }
  }
}

Candlestick

Candlestick representing price action for a given period


Properties

TYPE DEFINITION

{
  "name": "Candlestick",
  "type": "object",
  "description": "Candlestick representing price action for a given period",
  "properties": {
    "last_sequence": {
      "type": "string",
      "name": "last_sequence",
      "displayName": "last_sequence",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The value of the sequence field of the last price tick considered for this candlestick (see Websocket channel _Price_ _Ticks_)",
      "key": "last_sequence"
    },
    "instrument_code": {
      "type": "string",
      "name": "instrument_code",
      "displayName": "instrument_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The instrument/market the candlestick belongs to",
      "pattern": "^[A-Z]+_[A-Z]+$",
      "orderHint": 4,
      "rawType": {
        "name": "Instrument",
        "displayName": "Instrument",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "BTC_EUR",
        "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
        "pattern": "^[A-Z]+_[A-Z]+$",
        "structuredExample": {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        },
        "orderHint": 4
      },
      "originalType": "xchg_type.Instrument",
      "required": true,
      "examples": [
        {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        }
      ],
      "key": "instrument_code"
    },
    "granularity": {
      "type": "object",
      "properties": [
        {
          "type": "string",
          "name": "unit",
          "displayName": "unit",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "enum": [
            "MINUTES",
            "HOURS",
            "DAYS",
            "WEEKS",
            "MONTHS"
          ],
          "key": "unit"
        },
        {
          "type": "number",
          "name": "period",
          "displayName": "period",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "period"
        }
      ],
      "name": "granularity",
      "displayName": "granularity",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The time resolution of the candlestick",
      "discriminatorValue": null,
      "orderHint": 5,
      "additionalProperties": true,
      "rawType": {
        "name": "TimeGranularity",
        "displayName": "TimeGranularity",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "object"
        ],
        "description": "A length of time defined by unit and period used to identify the type of __candlestick__. Supported resolutions are 1, 5, 15, 30 MINUTES & 1, 4 HOURS & 1 DAYS & 1 WEEKS & 1 MONTHS.",
        "properties": [
          {
            "name": "unit",
            "displayName": "unit",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "enum": [
              "MINUTES",
              "HOURS",
              "DAYS",
              "WEEKS",
              "MONTHS"
            ],
            "key": "unit"
          },
          {
            "name": "period",
            "displayName": "period",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "number"
            ],
            "required": true,
            "key": "period"
          }
        ],
        "discriminatorValue": null,
        "orderHint": 5
      },
      "originalType": "xchg_type.TimeGranularity",
      "required": true,
      "key": "granularity"
    },
    "high": {
      "type": "string",
      "name": "high",
      "displayName": "high",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The highest rate during the candlestick duration",
      "key": "high"
    },
    "low": {
      "type": "string",
      "name": "low",
      "displayName": "low",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The lowest rate during the candlestick duration",
      "key": "low"
    },
    "open": {
      "type": "string",
      "name": "open",
      "displayName": "open",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The opening rate of the candlestick period",
      "key": "open"
    },
    "close": {
      "type": "string",
      "name": "close",
      "displayName": "close",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The closing rate of the candlestick period",
      "key": "close"
    },
    "volume": {
      "type": "string",
      "name": "volume",
      "displayName": "volume",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The total volume of trades on the market during the candlestick period",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "volume"
    },
    "time": {
      "type": "datetime",
      "name": "time",
      "displayName": "time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Start time of the candlestick period. See _/time_",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": true,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ],
      "key": "time"
    }
  }
}

CreateOrder


Properties

TYPE DEFINITION

{
  "name": "CreateOrder",
  "type": "object",
  "properties": {
    "instrument_code": {
      "type": "string",
      "name": "instrument_code",
      "displayName": "instrument_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
      "pattern": "^[A-Z]+_[A-Z]+$",
      "orderHint": 4,
      "rawType": {
        "name": "Instrument",
        "displayName": "Instrument",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "BTC_EUR",
        "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
        "pattern": "^[A-Z]+_[A-Z]+$",
        "structuredExample": {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        },
        "orderHint": 4
      },
      "originalType": "xchg_type.Instrument",
      "required": true,
      "examples": [
        {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        }
      ],
      "key": "instrument_code"
    },
    "type": {
      "type": "string",
      "name": "type",
      "displayName": "type",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "The type of the order",
      "enum": [
        "MARKET",
        "LIMIT",
        "STOP"
      ],
      "key": "type"
    },
    "side": {
      "type": "string",
      "name": "side",
      "displayName": "side",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "Direction of the order",
      "enum": [
        "BUY",
        "SELL"
      ],
      "key": "side"
    },
    "amount": {
      "type": "string",
      "name": "amount",
      "displayName": "amount",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The number of units to open order for",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "amount"
    },
    "price": {
      "type": "string",
      "name": "price",
      "displayName": "price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "is mandatory for LIMIT and STOP orders. Setting price for MARKET order type is ignored as this order type is always executed against instrument pricing available at the execution time.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": false,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "price"
    },
    "trigger_price": {
      "type": "string",
      "name": "trigger_price",
      "displayName": "trigger_price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "is mandatory for STOP orders. A stop-limit order will be executed at a specified price (see price), or better, after the given trigger price has been reached.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": false,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "trigger_price"
    },
    "client_id": {
      "type": "string",
      "name": "client_id",
      "displayName": "client_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "The optional client order id prevents duplicated orders. Should be a unique UUID. An order, with a client order id that already has been processed, will be rejected.",
      "key": "client_id"
    }
  }
}

FeeGroupId

unique identifier of a FeeGroup

TYPE DEFINITION

{
  "name": "FeeGroupId",
  "type": "string",
  "description": "unique identifier of a FeeGroup"
}

FeeTier


Properties

TYPE DEFINITION

{
  "name": "FeeTier",
  "type": "object",
  "properties": {
    "fee_group_id": {
      "type": "string",
      "name": "fee_group_id",
      "displayName": "fee_group_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "unique identifier of a FeeGroup",
      "orderHint": 12,
      "rawType": {
        "name": "FeeGroupId",
        "displayName": "FeeGroupId",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "description": "unique identifier of a FeeGroup",
        "orderHint": 12
      },
      "originalType": "xchg_type.FeeGroupId",
      "required": true
    },
    "volume": {
      "type": "string",
      "name": "volume",
      "displayName": "volume",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "maker_fee": {
      "type": "number",
      "name": "maker_fee",
      "displayName": "maker_fee",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "format": "double"
    },
    "taker_fee": {
      "type": "number",
      "name": "taker_fee",
      "displayName": "taker_fee",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "format": "double"
    }
  }
}

FeeGroup


Properties

TYPE DEFINITION

{
  "name": "FeeGroup",
  "type": "object",
  "properties": {
    "fee_group_id": {
      "type": "string",
      "name": "fee_group_id",
      "displayName": "fee_group_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "unique identifier of a FeeGroup",
      "orderHint": 12,
      "rawType": {
        "name": "FeeGroupId",
        "displayName": "FeeGroupId",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "description": "unique identifier of a FeeGroup",
        "orderHint": 12
      },
      "originalType": "xchg_type.FeeGroupId",
      "required": true,
      "key": "fee_group_id"
    },
    "fee_tiers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": [
          {
            "type": "string",
            "name": "fee_group_id",
            "displayName": "fee_group_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "unique identifier of a FeeGroup",
            "orderHint": 12,
            "rawType": {
              "name": "FeeGroupId",
              "displayName": "FeeGroupId",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "string"
              ],
              "description": "unique identifier of a FeeGroup",
              "orderHint": 12
            },
            "originalType": "xchg_type.FeeGroupId",
            "required": true,
            "key": "fee_group_id"
          },
          {
            "type": "string",
            "name": "volume",
            "displayName": "volume",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "orderHint": 0,
            "rawType": {
              "name": "Amount",
              "displayName": "Amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "string"
              ],
              "example": "6345.234",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "structuredExample": {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              },
              "orderHint": 0
            },
            "originalType": "xchg_type.Amount",
            "required": true,
            "examples": [
              {
                "value": "6345.234",
                "strict": true,
                "name": null,
                "structuredValue": "6345.234"
              }
            ],
            "key": "volume"
          },
          {
            "type": "number",
            "name": "maker_fee",
            "displayName": "maker_fee",
            "typePropertyKind": "TYPE_EXPRESSION",
            "required": true,
            "format": "double",
            "key": "maker_fee"
          },
          {
            "type": "number",
            "name": "taker_fee",
            "displayName": "taker_fee",
            "typePropertyKind": "TYPE_EXPRESSION",
            "required": true,
            "format": "double",
            "key": "taker_fee"
          }
        ],
        "name": "FeeTier",
        "displayName": "FeeTier",
        "typePropertyKind": "TYPE_EXPRESSION",
        "discriminatorValue": null,
        "orderHint": 13,
        "additionalProperties": true,
        "rawType": {
          "name": "FeeTier",
          "displayName": "FeeTier",
          "typePropertyKind": "TYPE_EXPRESSION",
          "type": [
            "object"
          ],
          "properties": [
            {
              "name": "fee_group_id",
              "displayName": "fee_group_id",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "xchg_type.FeeGroupId"
              ],
              "required": true,
              "key": "fee_group_id"
            },
            {
              "name": "volume",
              "displayName": "volume",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "xchg_type.Amount"
              ],
              "required": true,
              "key": "volume"
            },
            {
              "name": "maker_fee",
              "displayName": "maker_fee",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "number"
              ],
              "required": true,
              "format": "double",
              "key": "maker_fee"
            },
            {
              "name": "taker_fee",
              "displayName": "taker_fee",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "number"
              ],
              "required": true,
              "format": "double",
              "key": "taker_fee"
            }
          ],
          "discriminatorValue": null,
          "orderHint": 13
        },
        "originalType": "xchg_type.FeeTier"
      },
      "name": "fee_tiers",
      "displayName": "fee_tiers",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "fee_tiers"
    }
  }
}

Trade


Properties

TYPE DEFINITION

{
  "name": "Trade",
  "type": "object",
  "properties": {
    "trade_id": {
      "type": "string",
      "name": "trade_id",
      "displayName": "trade_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "order_id": {
      "type": "string",
      "name": "order_id",
      "displayName": "order_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "account_id": {
      "type": "string",
      "name": "account_id",
      "displayName": "account_id",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true
    },
    "amount": {
      "type": "string",
      "name": "amount",
      "displayName": "amount",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "side": {
      "type": "string",
      "name": "side",
      "displayName": "side",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "enum": [
        "BUY",
        "SELL"
      ]
    },
    "instrument_code": {
      "type": "string",
      "name": "instrument_code",
      "displayName": "instrument_code",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
      "pattern": "^[A-Z]+_[A-Z]+$",
      "orderHint": 4,
      "rawType": {
        "name": "Instrument",
        "displayName": "Instrument",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "BTC_EUR",
        "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
        "pattern": "^[A-Z]+_[A-Z]+$",
        "structuredExample": {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        },
        "orderHint": 4
      },
      "originalType": "xchg_type.Instrument",
      "required": true,
      "examples": [
        {
          "value": "BTC_EUR",
          "strict": true,
          "name": null,
          "structuredValue": "BTC_EUR"
        }
      ]
    },
    "price": {
      "type": "string",
      "name": "price",
      "displayName": "price",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "A decimal monetary amount of a currency.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ]
    },
    "time": {
      "type": "datetime",
      "name": "time",
      "displayName": "time",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
      "format": "rfc3339",
      "orderHint": 1,
      "rawType": {
        "name": "MarketTime",
        "displayName": "MarketTime",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "datetime"
        ],
        "example": "2017-10-05T16:01:41.090Z",
        "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
        "format": "rfc3339",
        "structuredExample": {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        },
        "orderHint": 1
      },
      "originalType": "xchg_type.MarketTime",
      "required": true,
      "examples": [
        {
          "value": "2017-10-05T16:01:41.090Z",
          "strict": true,
          "name": null,
          "structuredValue": "2017-10-05T16:01:41.090Z"
        }
      ]
    }
  }
}

TradingVolume


Properties

TYPE DEFINITION

{
  "name": "TradingVolume",
  "type": "object",
  "properties": {
    "volume": {
      "type": "string",
      "name": "volume",
      "displayName": "volume",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "The accumulated trading volume in BTC.",
      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
      "orderHint": 0,
      "rawType": {
        "name": "Amount",
        "displayName": "Amount",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "string"
        ],
        "example": "6345.234",
        "description": "A decimal monetary amount of a currency.",
        "pattern": "^[+-]?\\d+(\\.\\d*)?$",
        "structuredExample": {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        },
        "orderHint": 0
      },
      "originalType": "xchg_type.Amount",
      "required": true,
      "examples": [
        {
          "value": "6345.234",
          "strict": true,
          "name": null,
          "structuredValue": "6345.234"
        }
      ],
      "key": "volume"
    }
  }
}

TradeHistoryEntry

Trade recorded for exactly one order


Properties

TYPE DEFINITION

{
  "name": "TradeHistoryEntry",
  "type": "object",
  "description": "Trade recorded for exactly one order",
  "properties": {
    "trade": {
      "type": "object",
      "properties": [
        {
          "type": "string",
          "name": "trade_id",
          "displayName": "trade_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "trade_id"
        },
        {
          "type": "string",
          "name": "order_id",
          "displayName": "order_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "order_id"
        },
        {
          "type": "string",
          "name": "account_id",
          "displayName": "account_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "account_id"
        },
        {
          "type": "string",
          "name": "amount",
          "displayName": "amount",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "A decimal monetary amount of a currency.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "amount"
        },
        {
          "type": "string",
          "name": "side",
          "displayName": "side",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "enum": [
            "BUY",
            "SELL"
          ],
          "key": "side"
        },
        {
          "type": "string",
          "name": "instrument_code",
          "displayName": "instrument_code",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
          "pattern": "^[A-Z]+_[A-Z]+$",
          "orderHint": 4,
          "rawType": {
            "name": "Instrument",
            "displayName": "Instrument",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "BTC_EUR",
            "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
            "pattern": "^[A-Z]+_[A-Z]+$",
            "structuredExample": {
              "value": "BTC_EUR",
              "strict": true,
              "name": null,
              "structuredValue": "BTC_EUR"
            },
            "orderHint": 4
          },
          "originalType": "xchg_type.Instrument",
          "required": true,
          "examples": [
            {
              "value": "BTC_EUR",
              "strict": true,
              "name": null,
              "structuredValue": "BTC_EUR"
            }
          ],
          "key": "instrument_code"
        },
        {
          "type": "string",
          "name": "price",
          "displayName": "price",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "A decimal monetary amount of a currency.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "price"
        },
        {
          "type": "datetime",
          "name": "time",
          "displayName": "time",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
          "format": "rfc3339",
          "orderHint": 1,
          "rawType": {
            "name": "MarketTime",
            "displayName": "MarketTime",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "datetime"
            ],
            "example": "2017-10-05T16:01:41.090Z",
            "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
            "format": "rfc3339",
            "structuredExample": {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            },
            "orderHint": 1
          },
          "originalType": "xchg_type.MarketTime",
          "required": true,
          "examples": [
            {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            }
          ],
          "key": "time"
        }
      ],
      "name": "trade",
      "displayName": "trade",
      "typePropertyKind": "TYPE_EXPRESSION",
      "discriminatorValue": null,
      "orderHint": 15,
      "additionalProperties": true,
      "rawType": {
        "name": "Trade",
        "displayName": "Trade",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "object"
        ],
        "properties": [
          {
            "name": "trade_id",
            "displayName": "trade_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "key": "trade_id"
          },
          {
            "name": "order_id",
            "displayName": "order_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "key": "order_id"
          },
          {
            "name": "account_id",
            "displayName": "account_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "key": "account_id"
          },
          {
            "name": "amount",
            "displayName": "amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": true,
            "key": "amount"
          },
          {
            "name": "side",
            "displayName": "side",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "enum": [
              "BUY",
              "SELL"
            ],
            "key": "side"
          },
          {
            "name": "instrument_code",
            "displayName": "instrument_code",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Instrument"
            ],
            "required": true,
            "key": "instrument_code"
          },
          {
            "name": "price",
            "displayName": "price",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": true,
            "key": "price"
          },
          {
            "name": "time",
            "displayName": "time",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.MarketTime"
            ],
            "required": true,
            "key": "time"
          }
        ],
        "discriminatorValue": null,
        "orderHint": 15
      },
      "originalType": "xchg_type.Trade",
      "required": true,
      "key": "trade"
    },
    "fee": {
      "type": "object",
      "properties": [
        {
          "type": "string",
          "name": "fee_amount",
          "displayName": "fee_amount",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "A decimal monetary amount of a currency.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "fee_amount"
        },
        {
          "type": "string",
          "name": "fee_percentage",
          "displayName": "fee_percentage",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "A decimal monetary amount of a currency.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "fee_percentage"
        },
        {
          "type": "string",
          "name": "fee_group_id",
          "displayName": "fee_group_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "unique identifier of a FeeGroup",
          "orderHint": 12,
          "rawType": {
            "name": "FeeGroupId",
            "displayName": "FeeGroupId",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "description": "unique identifier of a FeeGroup",
            "orderHint": 12
          },
          "originalType": "xchg_type.FeeGroupId",
          "required": true,
          "key": "fee_group_id"
        },
        {
          "type": "string",
          "name": "running_trading_volume",
          "displayName": "running_trading_volume",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "A decimal monetary amount of a currency.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "running_trading_volume"
        }
      ],
      "name": "fee",
      "displayName": "fee",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "description": "fee applied account balance as part of trade settlement",
      "additionalProperties": true,
      "key": "fee"
    }
  }
}

OrderHistoryEntry

active or inactive order, for orders with the status FILLED, FILLED_FULLY, FILLED_CLOSED and FILLED_REJECTED, information about trades and fees is returned.


Properties

TYPE DEFINITION

{
  "name": "OrderHistoryEntry",
  "type": "object",
  "description": "active or inactive order, for orders with the status __FILLED__, __FILLED_FULLY__, __FILLED_CLOSED__ and __FILLED_REJECTED__, information about trades and fees is returned.",
  "properties": {
    "order": {
      "type": "object",
      "properties": [
        {
          "type": "string",
          "name": "order_id",
          "displayName": "order_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "order_id"
        },
        {
          "type": "string",
          "name": "account_id",
          "displayName": "account_id",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "key": "account_id"
        },
        {
          "type": "string",
          "name": "instrument_code",
          "displayName": "instrument_code",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
          "pattern": "^[A-Z]+_[A-Z]+$",
          "orderHint": 4,
          "rawType": {
            "name": "Instrument",
            "displayName": "Instrument",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "BTC_EUR",
            "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
            "pattern": "^[A-Z]+_[A-Z]+$",
            "structuredExample": {
              "value": "BTC_EUR",
              "strict": true,
              "name": null,
              "structuredValue": "BTC_EUR"
            },
            "orderHint": 4
          },
          "originalType": "xchg_type.Instrument",
          "required": true,
          "examples": [
            {
              "value": "BTC_EUR",
              "strict": true,
              "name": null,
              "structuredValue": "BTC_EUR"
            }
          ],
          "key": "instrument_code"
        },
        {
          "type": "string",
          "name": "amount",
          "displayName": "amount",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The amount of currency for this order",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "amount"
        },
        {
          "type": "string",
          "name": "filled_amount",
          "displayName": "filled_amount",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The already filled amount of currency for this order",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "filled_amount"
        },
        {
          "type": "string",
          "name": "side",
          "displayName": "side",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "description": "Direction of the order",
          "enum": [
            "BUY",
            "SELL"
          ],
          "key": "side"
        },
        {
          "type": "string",
          "name": "type",
          "displayName": "type",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "description": "The type of the order",
          "enum": [
            "MARKET",
            "LIMIT",
            "STOP"
          ],
          "key": "type"
        },
        {
          "type": "string",
          "name": "status",
          "displayName": "status",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "description": "An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered in __OPEN__ state and is submitted to the order book. If an order validation fails, the order status is updated to __REJECTED__ specifying __reason__ for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to __FAILED__ and the user should re-submit the order.",
          "enum": [
            "OPEN",
            "STOP_TRIGGERED",
            "FILLED",
            "FILLED_FULLY",
            "FILLED_CLOSED",
            "FILLED_REJECTED",
            "REJECTED",
            "CLOSED",
            "FAILED"
          ],
          "key": "status"
        },
        {
          "type": "number",
          "name": "sequence",
          "displayName": "sequence",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "Global monotonically-increasing numerical sequence bound to account activity.",
          "orderHint": 2,
          "rawType": {
            "name": "AccountSequence",
            "displayName": "AccountSequence",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "number"
            ],
            "description": "Global monotonically-increasing numerical sequence bound to account activity.",
            "orderHint": 2
          },
          "originalType": "xchg_type.AccountSequence",
          "required": false,
          "key": "sequence"
        },
        {
          "type": "string",
          "name": "price",
          "displayName": "price",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The price at which the order is set to execute. Applicable to __LIMIT__ and __STOP__ orders.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": true,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "price"
        },
        {
          "type": "string",
          "name": "reason",
          "displayName": "reason",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": false,
          "description": "Reason specifying why an order was rejected. Only applicable to order status __REJECTED__ and __FILLED_REJECTED__.",
          "enum": [
            "INSUFFICIENT_FUNDS",
            "INSUFFICIENT_LIQUIDITY",
            "SELF_TRADE_PREVENTED"
          ],
          "key": "reason"
        },
        {
          "type": "datetime",
          "name": "time",
          "displayName": "time",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The time at which the order was executed.",
          "format": "rfc3339",
          "orderHint": 1,
          "rawType": {
            "name": "MarketTime",
            "displayName": "MarketTime",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "datetime"
            ],
            "example": "2017-10-05T16:01:41.090Z",
            "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
            "format": "rfc3339",
            "structuredExample": {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            },
            "orderHint": 1
          },
          "originalType": "xchg_type.MarketTime",
          "required": true,
          "examples": [
            {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            }
          ],
          "key": "time"
        },
        {
          "type": "datetime",
          "name": "time_last_updated",
          "displayName": "time_last_updated",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The time at which the order was last updated, i.e. the order status changed.",
          "format": "rfc3339",
          "orderHint": 1,
          "rawType": {
            "name": "MarketTime",
            "displayName": "MarketTime",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "datetime"
            ],
            "example": "2017-10-05T16:01:41.090Z",
            "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
            "format": "rfc3339",
            "structuredExample": {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            },
            "orderHint": 1
          },
          "originalType": "xchg_type.MarketTime",
          "required": false,
          "examples": [
            {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            }
          ],
          "key": "time_last_updated"
        },
        {
          "type": "datetime",
          "name": "time_triggered",
          "displayName": "time_triggered",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The time at which the __STOP__ order was triggered.",
          "format": "rfc3339",
          "orderHint": 1,
          "rawType": {
            "name": "MarketTime",
            "displayName": "MarketTime",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "datetime"
            ],
            "example": "2017-10-05T16:01:41.090Z",
            "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
            "format": "rfc3339",
            "structuredExample": {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            },
            "orderHint": 1
          },
          "originalType": "xchg_type.MarketTime",
          "required": false,
          "examples": [
            {
              "value": "2017-10-05T16:01:41.090Z",
              "strict": true,
              "name": null,
              "structuredValue": "2017-10-05T16:01:41.090Z"
            }
          ],
          "key": "time_triggered"
        },
        {
          "type": "string",
          "name": "trigger_price",
          "displayName": "trigger_price",
          "typePropertyKind": "TYPE_EXPRESSION",
          "description": "The price at which the __STOP__ order is set to trigger conversion into a __LIMIT__ order. Only applicable to __STOP__ orders.",
          "pattern": "^[+-]?\\d+(\\.\\d*)?$",
          "orderHint": 0,
          "rawType": {
            "name": "Amount",
            "displayName": "Amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "example": "6345.234",
            "description": "A decimal monetary amount of a currency.",
            "pattern": "^[+-]?\\d+(\\.\\d*)?$",
            "structuredExample": {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            },
            "orderHint": 0
          },
          "originalType": "xchg_type.Amount",
          "required": false,
          "examples": [
            {
              "value": "6345.234",
              "strict": true,
              "name": null,
              "structuredValue": "6345.234"
            }
          ],
          "key": "trigger_price"
        }
      ],
      "name": "order",
      "displayName": "order",
      "typePropertyKind": "TYPE_EXPRESSION",
      "discriminatorValue": null,
      "orderHint": 8,
      "additionalProperties": true,
      "rawType": {
        "name": "Order",
        "displayName": "Order",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "object"
        ],
        "properties": [
          {
            "name": "order_id",
            "displayName": "order_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "key": "order_id"
          },
          {
            "name": "account_id",
            "displayName": "account_id",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "key": "account_id"
          },
          {
            "name": "instrument_code",
            "displayName": "instrument_code",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Instrument"
            ],
            "required": true,
            "key": "instrument_code"
          },
          {
            "name": "amount",
            "displayName": "amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": true,
            "description": "The amount of currency for this order",
            "key": "amount"
          },
          {
            "name": "filled_amount",
            "displayName": "filled_amount",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": true,
            "description": "The already filled amount of currency for this order",
            "key": "filled_amount"
          },
          {
            "name": "side",
            "displayName": "side",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "description": "Direction of the order",
            "enum": [
              "BUY",
              "SELL"
            ],
            "key": "side"
          },
          {
            "name": "type",
            "displayName": "type",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "description": "The type of the order",
            "enum": [
              "MARKET",
              "LIMIT",
              "STOP"
            ],
            "key": "type"
          },
          {
            "name": "status",
            "displayName": "status",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": true,
            "description": "An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered in __OPEN__ state and is submitted to the order book. If an order validation fails, the order status is updated to __REJECTED__ specifying __reason__ for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to __FAILED__ and the user should re-submit the order.",
            "enum": [
              "OPEN",
              "STOP_TRIGGERED",
              "FILLED",
              "FILLED_FULLY",
              "FILLED_CLOSED",
              "FILLED_REJECTED",
              "REJECTED",
              "CLOSED",
              "FAILED"
            ],
            "key": "status"
          },
          {
            "name": "sequence",
            "displayName": "sequence",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.AccountSequence"
            ],
            "required": false,
            "key": "sequence"
          },
          {
            "name": "price",
            "displayName": "price",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": true,
            "description": "The price at which the order is set to execute. Applicable to __LIMIT__ and __STOP__ orders.",
            "key": "price"
          },
          {
            "name": "reason",
            "displayName": "reason",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "string"
            ],
            "required": false,
            "description": "Reason specifying why an order was rejected. Only applicable to order status __REJECTED__ and __FILLED_REJECTED__.",
            "enum": [
              "INSUFFICIENT_FUNDS",
              "INSUFFICIENT_LIQUIDITY",
              "SELF_TRADE_PREVENTED"
            ],
            "key": "reason"
          },
          {
            "name": "time",
            "displayName": "time",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.MarketTime"
            ],
            "required": true,
            "description": "The time at which the order was executed.",
            "key": "time"
          },
          {
            "name": "time_last_updated",
            "displayName": "time_last_updated",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.MarketTime"
            ],
            "required": false,
            "description": "The time at which the order was last updated, i.e. the order status changed.",
            "key": "time_last_updated"
          },
          {
            "name": "time_triggered",
            "displayName": "time_triggered",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.MarketTime"
            ],
            "required": false,
            "description": "The time at which the __STOP__ order was triggered.",
            "key": "time_triggered"
          },
          {
            "name": "trigger_price",
            "displayName": "trigger_price",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Amount"
            ],
            "required": false,
            "description": "The price at which the __STOP__ order is set to trigger conversion into a __LIMIT__ order. Only applicable to __STOP__ orders.",
            "key": "trigger_price"
          }
        ],
        "discriminatorValue": null,
        "orderHint": 8
      },
      "originalType": "xchg_type.Order",
      "required": true,
      "key": "order"
    },
    "trades": {
      "type": "object",
      "properties": [
        {
          "type": "object",
          "properties": [
            {
              "type": "string",
              "name": "trade_id",
              "displayName": "trade_id",
              "typePropertyKind": "TYPE_EXPRESSION",
              "required": true,
              "key": "trade_id"
            },
            {
              "type": "string",
              "name": "order_id",
              "displayName": "order_id",
              "typePropertyKind": "TYPE_EXPRESSION",
              "required": true,
              "key": "order_id"
            },
            {
              "type": "string",
              "name": "account_id",
              "displayName": "account_id",
              "typePropertyKind": "TYPE_EXPRESSION",
              "required": true,
              "key": "account_id"
            },
            {
              "type": "string",
              "name": "amount",
              "displayName": "amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "orderHint": 0,
              "rawType": {
                "name": "Amount",
                "displayName": "Amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "6345.234",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "structuredExample": {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                },
                "orderHint": 0
              },
              "originalType": "xchg_type.Amount",
              "required": true,
              "examples": [
                {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                }
              ],
              "key": "amount"
            },
            {
              "type": "string",
              "name": "side",
              "displayName": "side",
              "typePropertyKind": "TYPE_EXPRESSION",
              "required": true,
              "enum": [
                "BUY",
                "SELL"
              ],
              "key": "side"
            },
            {
              "type": "string",
              "name": "instrument_code",
              "displayName": "instrument_code",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
              "pattern": "^[A-Z]+_[A-Z]+$",
              "orderHint": 4,
              "rawType": {
                "name": "Instrument",
                "displayName": "Instrument",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "BTC_EUR",
                "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                "pattern": "^[A-Z]+_[A-Z]+$",
                "structuredExample": {
                  "value": "BTC_EUR",
                  "strict": true,
                  "name": null,
                  "structuredValue": "BTC_EUR"
                },
                "orderHint": 4
              },
              "originalType": "xchg_type.Instrument",
              "required": true,
              "examples": [
                {
                  "value": "BTC_EUR",
                  "strict": true,
                  "name": null,
                  "structuredValue": "BTC_EUR"
                }
              ],
              "key": "instrument_code"
            },
            {
              "type": "string",
              "name": "price",
              "displayName": "price",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "orderHint": 0,
              "rawType": {
                "name": "Amount",
                "displayName": "Amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "6345.234",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "structuredExample": {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                },
                "orderHint": 0
              },
              "originalType": "xchg_type.Amount",
              "required": true,
              "examples": [
                {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                }
              ],
              "key": "price"
            },
            {
              "type": "datetime",
              "name": "time",
              "displayName": "time",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
              "format": "rfc3339",
              "orderHint": 1,
              "rawType": {
                "name": "MarketTime",
                "displayName": "MarketTime",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "datetime"
                ],
                "example": "2017-10-05T16:01:41.090Z",
                "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                "format": "rfc3339",
                "structuredExample": {
                  "value": "2017-10-05T16:01:41.090Z",
                  "strict": true,
                  "name": null,
                  "structuredValue": "2017-10-05T16:01:41.090Z"
                },
                "orderHint": 1
              },
              "originalType": "xchg_type.MarketTime",
              "required": true,
              "examples": [
                {
                  "value": "2017-10-05T16:01:41.090Z",
                  "strict": true,
                  "name": null,
                  "structuredValue": "2017-10-05T16:01:41.090Z"
                }
              ],
              "key": "time"
            }
          ],
          "name": "trade",
          "displayName": "trade",
          "typePropertyKind": "TYPE_EXPRESSION",
          "discriminatorValue": null,
          "orderHint": 15,
          "additionalProperties": true,
          "rawType": {
            "name": "Trade",
            "displayName": "Trade",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "object"
            ],
            "properties": [
              {
                "name": "trade_id",
                "displayName": "trade_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "required": true,
                "key": "trade_id"
              },
              {
                "name": "order_id",
                "displayName": "order_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "required": true,
                "key": "order_id"
              },
              {
                "name": "account_id",
                "displayName": "account_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "required": true,
                "key": "account_id"
              },
              {
                "name": "amount",
                "displayName": "amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Amount"
                ],
                "required": true,
                "key": "amount"
              },
              {
                "name": "side",
                "displayName": "side",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "required": true,
                "enum": [
                  "BUY",
                  "SELL"
                ],
                "key": "side"
              },
              {
                "name": "instrument_code",
                "displayName": "instrument_code",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Instrument"
                ],
                "required": true,
                "key": "instrument_code"
              },
              {
                "name": "price",
                "displayName": "price",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Amount"
                ],
                "required": true,
                "key": "price"
              },
              {
                "name": "time",
                "displayName": "time",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.MarketTime"
                ],
                "required": true,
                "key": "time"
              }
            ],
            "discriminatorValue": null,
            "orderHint": 15
          },
          "originalType": "xchg_type.Trade",
          "required": true,
          "key": "trade"
        },
        {
          "type": "object",
          "properties": [
            {
              "type": "string",
              "name": "fee_amount",
              "displayName": "fee_amount",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "orderHint": 0,
              "rawType": {
                "name": "Amount",
                "displayName": "Amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "6345.234",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "structuredExample": {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                },
                "orderHint": 0
              },
              "originalType": "xchg_type.Amount",
              "required": true,
              "examples": [
                {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                }
              ],
              "key": "fee_amount"
            },
            {
              "type": "string",
              "name": "fee_percentage",
              "displayName": "fee_percentage",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "orderHint": 0,
              "rawType": {
                "name": "Amount",
                "displayName": "Amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "6345.234",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "structuredExample": {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                },
                "orderHint": 0
              },
              "originalType": "xchg_type.Amount",
              "required": true,
              "examples": [
                {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                }
              ],
              "key": "fee_percentage"
            },
            {
              "type": "string",
              "name": "fee_group_id",
              "displayName": "fee_group_id",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "unique identifier of a FeeGroup",
              "orderHint": 12,
              "rawType": {
                "name": "FeeGroupId",
                "displayName": "FeeGroupId",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "description": "unique identifier of a FeeGroup",
                "orderHint": 12
              },
              "originalType": "xchg_type.FeeGroupId",
              "required": true,
              "key": "fee_group_id"
            },
            {
              "type": "string",
              "name": "running_trading_volume",
              "displayName": "running_trading_volume",
              "typePropertyKind": "TYPE_EXPRESSION",
              "description": "A decimal monetary amount of a currency.",
              "pattern": "^[+-]?\\d+(\\.\\d*)?$",
              "orderHint": 0,
              "rawType": {
                "name": "Amount",
                "displayName": "Amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "string"
                ],
                "example": "6345.234",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "structuredExample": {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                },
                "orderHint": 0
              },
              "originalType": "xchg_type.Amount",
              "required": true,
              "examples": [
                {
                  "value": "6345.234",
                  "strict": true,
                  "name": null,
                  "structuredValue": "6345.234"
                }
              ],
              "key": "running_trading_volume"
            }
          ],
          "name": "fee",
          "displayName": "fee",
          "typePropertyKind": "TYPE_EXPRESSION",
          "required": true,
          "description": "fee applied account balance as part of trade settlement",
          "additionalProperties": true,
          "key": "fee"
        }
      ],
      "name": "trades",
      "displayName": "trades",
      "typePropertyKind": "TYPE_EXPRESSION",
      "description": "one or more trades if this order is SETTLED",
      "discriminatorValue": null,
      "orderHint": 17,
      "additionalProperties": true,
      "rawType": {
        "name": "TradeHistoryEntry",
        "displayName": "TradeHistoryEntry",
        "typePropertyKind": "TYPE_EXPRESSION",
        "type": [
          "object"
        ],
        "description": "Trade recorded for exactly one order",
        "properties": [
          {
            "name": "trade",
            "displayName": "trade",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "xchg_type.Trade"
            ],
            "required": true,
            "key": "trade"
          },
          {
            "name": "fee",
            "displayName": "fee",
            "typePropertyKind": "TYPE_EXPRESSION",
            "type": [
              "object"
            ],
            "required": true,
            "description": "fee applied account balance as part of trade settlement",
            "properties": [
              {
                "name": "fee_amount",
                "displayName": "fee_amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Amount"
                ],
                "required": true,
                "key": "fee_amount"
              },
              {
                "name": "fee_percentage",
                "displayName": "fee_percentage",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Amount"
                ],
                "required": true,
                "key": "fee_percentage"
              },
              {
                "name": "fee_group_id",
                "displayName": "fee_group_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.FeeGroupId"
                ],
                "required": true,
                "key": "fee_group_id"
              },
              {
                "name": "running_trading_volume",
                "displayName": "running_trading_volume",
                "typePropertyKind": "TYPE_EXPRESSION",
                "type": [
                  "xchg_type.Amount"
                ],
                "required": true,
                "key": "running_trading_volume"
              }
            ],
            "key": "fee"
          }
        ],
        "discriminatorValue": null,
        "orderHint": 17
      },
      "originalType": "history.TradeHistoryEntry",
      "required": false,
      "key": "trades"
    }
  }
}

OrderHistory

Paginated collection of account orders


Properties

TYPE DEFINITION

{
  "name": "OrderHistory",
  "type": "object",
  "description": "Paginated collection of account orders",
  "properties": {
    "order_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": [
          {
            "type": "object",
            "properties": [
              {
                "type": "string",
                "name": "order_id",
                "displayName": "order_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "key": "order_id"
              },
              {
                "type": "string",
                "name": "account_id",
                "displayName": "account_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "key": "account_id"
              },
              {
                "type": "string",
                "name": "instrument_code",
                "displayName": "instrument_code",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                "pattern": "^[A-Z]+_[A-Z]+$",
                "orderHint": 4,
                "rawType": {
                  "name": "Instrument",
                  "displayName": "Instrument",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "BTC_EUR",
                  "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                  "pattern": "^[A-Z]+_[A-Z]+$",
                  "structuredExample": {
                    "value": "BTC_EUR",
                    "strict": true,
                    "name": null,
                    "structuredValue": "BTC_EUR"
                  },
                  "orderHint": 4
                },
                "originalType": "xchg_type.Instrument",
                "required": true,
                "examples": [
                  {
                    "value": "BTC_EUR",
                    "strict": true,
                    "name": null,
                    "structuredValue": "BTC_EUR"
                  }
                ],
                "key": "instrument_code"
              },
              {
                "type": "string",
                "name": "amount",
                "displayName": "amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The amount of currency for this order",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "amount"
              },
              {
                "type": "string",
                "name": "filled_amount",
                "displayName": "filled_amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The already filled amount of currency for this order",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "filled_amount"
              },
              {
                "type": "string",
                "name": "side",
                "displayName": "side",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "description": "Direction of the order",
                "enum": [
                  "BUY",
                  "SELL"
                ],
                "key": "side"
              },
              {
                "type": "string",
                "name": "type",
                "displayName": "type",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "description": "The type of the order",
                "enum": [
                  "MARKET",
                  "LIMIT",
                  "STOP"
                ],
                "key": "type"
              },
              {
                "type": "string",
                "name": "status",
                "displayName": "status",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "description": "An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered in __OPEN__ state and is submitted to the order book. If an order validation fails, the order status is updated to __REJECTED__ specifying __reason__ for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to __FAILED__ and the user should re-submit the order.",
                "enum": [
                  "OPEN",
                  "STOP_TRIGGERED",
                  "FILLED",
                  "FILLED_FULLY",
                  "FILLED_CLOSED",
                  "FILLED_REJECTED",
                  "REJECTED",
                  "CLOSED",
                  "FAILED"
                ],
                "key": "status"
              },
              {
                "type": "number",
                "name": "sequence",
                "displayName": "sequence",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "Global monotonically-increasing numerical sequence bound to account activity.",
                "orderHint": 2,
                "rawType": {
                  "name": "AccountSequence",
                  "displayName": "AccountSequence",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "number"
                  ],
                  "description": "Global monotonically-increasing numerical sequence bound to account activity.",
                  "orderHint": 2
                },
                "originalType": "xchg_type.AccountSequence",
                "required": false,
                "key": "sequence"
              },
              {
                "type": "string",
                "name": "price",
                "displayName": "price",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The price at which the order is set to execute. Applicable to __LIMIT__ and __STOP__ orders.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "price"
              },
              {
                "type": "string",
                "name": "reason",
                "displayName": "reason",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": false,
                "description": "Reason specifying why an order was rejected. Only applicable to order status __REJECTED__ and __FILLED_REJECTED__.",
                "enum": [
                  "INSUFFICIENT_FUNDS",
                  "INSUFFICIENT_LIQUIDITY",
                  "SELF_TRADE_PREVENTED"
                ],
                "key": "reason"
              },
              {
                "type": "datetime",
                "name": "time",
                "displayName": "time",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The time at which the order was executed.",
                "format": "rfc3339",
                "orderHint": 1,
                "rawType": {
                  "name": "MarketTime",
                  "displayName": "MarketTime",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "datetime"
                  ],
                  "example": "2017-10-05T16:01:41.090Z",
                  "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                  "format": "rfc3339",
                  "structuredExample": {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  },
                  "orderHint": 1
                },
                "originalType": "xchg_type.MarketTime",
                "required": true,
                "examples": [
                  {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  }
                ],
                "key": "time"
              },
              {
                "type": "datetime",
                "name": "time_last_updated",
                "displayName": "time_last_updated",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The time at which the order was last updated, i.e. the order status changed.",
                "format": "rfc3339",
                "orderHint": 1,
                "rawType": {
                  "name": "MarketTime",
                  "displayName": "MarketTime",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "datetime"
                  ],
                  "example": "2017-10-05T16:01:41.090Z",
                  "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                  "format": "rfc3339",
                  "structuredExample": {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  },
                  "orderHint": 1
                },
                "originalType": "xchg_type.MarketTime",
                "required": false,
                "examples": [
                  {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  }
                ],
                "key": "time_last_updated"
              },
              {
                "type": "datetime",
                "name": "time_triggered",
                "displayName": "time_triggered",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The time at which the __STOP__ order was triggered.",
                "format": "rfc3339",
                "orderHint": 1,
                "rawType": {
                  "name": "MarketTime",
                  "displayName": "MarketTime",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "datetime"
                  ],
                  "example": "2017-10-05T16:01:41.090Z",
                  "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                  "format": "rfc3339",
                  "structuredExample": {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  },
                  "orderHint": 1
                },
                "originalType": "xchg_type.MarketTime",
                "required": false,
                "examples": [
                  {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  }
                ],
                "key": "time_triggered"
              },
              {
                "type": "string",
                "name": "trigger_price",
                "displayName": "trigger_price",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The price at which the __STOP__ order is set to trigger conversion into a __LIMIT__ order. Only applicable to __STOP__ orders.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": false,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "trigger_price"
              }
            ],
            "name": "order",
            "displayName": "order",
            "typePropertyKind": "TYPE_EXPRESSION",
            "discriminatorValue": null,
            "orderHint": 8,
            "additionalProperties": true,
            "rawType": {
              "name": "Order",
              "displayName": "Order",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "object"
              ],
              "properties": [
                {
                  "name": "order_id",
                  "displayName": "order_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "key": "order_id"
                },
                {
                  "name": "account_id",
                  "displayName": "account_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "key": "account_id"
                },
                {
                  "name": "instrument_code",
                  "displayName": "instrument_code",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Instrument"
                  ],
                  "required": true,
                  "key": "instrument_code"
                },
                {
                  "name": "amount",
                  "displayName": "amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "description": "The amount of currency for this order",
                  "key": "amount"
                },
                {
                  "name": "filled_amount",
                  "displayName": "filled_amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "description": "The already filled amount of currency for this order",
                  "key": "filled_amount"
                },
                {
                  "name": "side",
                  "displayName": "side",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "description": "Direction of the order",
                  "enum": [
                    "BUY",
                    "SELL"
                  ],
                  "key": "side"
                },
                {
                  "name": "type",
                  "displayName": "type",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "description": "The type of the order",
                  "enum": [
                    "MARKET",
                    "LIMIT",
                    "STOP"
                  ],
                  "key": "type"
                },
                {
                  "name": "status",
                  "displayName": "status",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "description": "An order is tracked in the system with a specific status. If an order is successfully executed, then it is considered in __OPEN__ state and is submitted to the order book. If an order validation fails, the order status is updated to __REJECTED__ specifying __reason__ for the rejection. If the system fails to process an order due to unforeseen service disruptions, then the order status is updated to __FAILED__ and the user should re-submit the order.",
                  "enum": [
                    "OPEN",
                    "STOP_TRIGGERED",
                    "FILLED",
                    "FILLED_FULLY",
                    "FILLED_CLOSED",
                    "FILLED_REJECTED",
                    "REJECTED",
                    "CLOSED",
                    "FAILED"
                  ],
                  "key": "status"
                },
                {
                  "name": "sequence",
                  "displayName": "sequence",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.AccountSequence"
                  ],
                  "required": false,
                  "key": "sequence"
                },
                {
                  "name": "price",
                  "displayName": "price",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "description": "The price at which the order is set to execute. Applicable to __LIMIT__ and __STOP__ orders.",
                  "key": "price"
                },
                {
                  "name": "reason",
                  "displayName": "reason",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": false,
                  "description": "Reason specifying why an order was rejected. Only applicable to order status __REJECTED__ and __FILLED_REJECTED__.",
                  "enum": [
                    "INSUFFICIENT_FUNDS",
                    "INSUFFICIENT_LIQUIDITY",
                    "SELF_TRADE_PREVENTED"
                  ],
                  "key": "reason"
                },
                {
                  "name": "time",
                  "displayName": "time",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.MarketTime"
                  ],
                  "required": true,
                  "description": "The time at which the order was executed.",
                  "key": "time"
                },
                {
                  "name": "time_last_updated",
                  "displayName": "time_last_updated",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.MarketTime"
                  ],
                  "required": false,
                  "description": "The time at which the order was last updated, i.e. the order status changed.",
                  "key": "time_last_updated"
                },
                {
                  "name": "time_triggered",
                  "displayName": "time_triggered",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.MarketTime"
                  ],
                  "required": false,
                  "description": "The time at which the __STOP__ order was triggered.",
                  "key": "time_triggered"
                },
                {
                  "name": "trigger_price",
                  "displayName": "trigger_price",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": false,
                  "description": "The price at which the __STOP__ order is set to trigger conversion into a __LIMIT__ order. Only applicable to __STOP__ orders.",
                  "key": "trigger_price"
                }
              ],
              "discriminatorValue": null,
              "orderHint": 8
            },
            "originalType": "xchg_type.Order",
            "required": true,
            "key": "order"
          },
          {
            "type": "object",
            "properties": [
              {
                "type": "object",
                "properties": [
                  {
                    "type": "string",
                    "name": "trade_id",
                    "displayName": "trade_id",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "required": true,
                    "key": "trade_id"
                  },
                  {
                    "type": "string",
                    "name": "order_id",
                    "displayName": "order_id",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "required": true,
                    "key": "order_id"
                  },
                  {
                    "type": "string",
                    "name": "account_id",
                    "displayName": "account_id",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "required": true,
                    "key": "account_id"
                  },
                  {
                    "type": "string",
                    "name": "amount",
                    "displayName": "amount",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "A decimal monetary amount of a currency.",
                    "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                    "orderHint": 0,
                    "rawType": {
                      "name": "Amount",
                      "displayName": "Amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "6345.234",
                      "description": "A decimal monetary amount of a currency.",
                      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                      "structuredExample": {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      },
                      "orderHint": 0
                    },
                    "originalType": "xchg_type.Amount",
                    "required": true,
                    "examples": [
                      {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      }
                    ],
                    "key": "amount"
                  },
                  {
                    "type": "string",
                    "name": "side",
                    "displayName": "side",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "required": true,
                    "enum": [
                      "BUY",
                      "SELL"
                    ],
                    "key": "side"
                  },
                  {
                    "type": "string",
                    "name": "instrument_code",
                    "displayName": "instrument_code",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                    "pattern": "^[A-Z]+_[A-Z]+$",
                    "orderHint": 4,
                    "rawType": {
                      "name": "Instrument",
                      "displayName": "Instrument",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "BTC_EUR",
                      "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                      "pattern": "^[A-Z]+_[A-Z]+$",
                      "structuredExample": {
                        "value": "BTC_EUR",
                        "strict": true,
                        "name": null,
                        "structuredValue": "BTC_EUR"
                      },
                      "orderHint": 4
                    },
                    "originalType": "xchg_type.Instrument",
                    "required": true,
                    "examples": [
                      {
                        "value": "BTC_EUR",
                        "strict": true,
                        "name": null,
                        "structuredValue": "BTC_EUR"
                      }
                    ],
                    "key": "instrument_code"
                  },
                  {
                    "type": "string",
                    "name": "price",
                    "displayName": "price",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "A decimal monetary amount of a currency.",
                    "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                    "orderHint": 0,
                    "rawType": {
                      "name": "Amount",
                      "displayName": "Amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "6345.234",
                      "description": "A decimal monetary amount of a currency.",
                      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                      "structuredExample": {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      },
                      "orderHint": 0
                    },
                    "originalType": "xchg_type.Amount",
                    "required": true,
                    "examples": [
                      {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      }
                    ],
                    "key": "price"
                  },
                  {
                    "type": "datetime",
                    "name": "time",
                    "displayName": "time",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                    "format": "rfc3339",
                    "orderHint": 1,
                    "rawType": {
                      "name": "MarketTime",
                      "displayName": "MarketTime",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "datetime"
                      ],
                      "example": "2017-10-05T16:01:41.090Z",
                      "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                      "format": "rfc3339",
                      "structuredExample": {
                        "value": "2017-10-05T16:01:41.090Z",
                        "strict": true,
                        "name": null,
                        "structuredValue": "2017-10-05T16:01:41.090Z"
                      },
                      "orderHint": 1
                    },
                    "originalType": "xchg_type.MarketTime",
                    "required": true,
                    "examples": [
                      {
                        "value": "2017-10-05T16:01:41.090Z",
                        "strict": true,
                        "name": null,
                        "structuredValue": "2017-10-05T16:01:41.090Z"
                      }
                    ],
                    "key": "time"
                  }
                ],
                "name": "trade",
                "displayName": "trade",
                "typePropertyKind": "TYPE_EXPRESSION",
                "discriminatorValue": null,
                "orderHint": 15,
                "additionalProperties": true,
                "rawType": {
                  "name": "Trade",
                  "displayName": "Trade",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "object"
                  ],
                  "properties": [
                    {
                      "name": "trade_id",
                      "displayName": "trade_id",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "required": true,
                      "key": "trade_id"
                    },
                    {
                      "name": "order_id",
                      "displayName": "order_id",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "required": true,
                      "key": "order_id"
                    },
                    {
                      "name": "account_id",
                      "displayName": "account_id",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "required": true,
                      "key": "account_id"
                    },
                    {
                      "name": "amount",
                      "displayName": "amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Amount"
                      ],
                      "required": true,
                      "key": "amount"
                    },
                    {
                      "name": "side",
                      "displayName": "side",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "required": true,
                      "enum": [
                        "BUY",
                        "SELL"
                      ],
                      "key": "side"
                    },
                    {
                      "name": "instrument_code",
                      "displayName": "instrument_code",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Instrument"
                      ],
                      "required": true,
                      "key": "instrument_code"
                    },
                    {
                      "name": "price",
                      "displayName": "price",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Amount"
                      ],
                      "required": true,
                      "key": "price"
                    },
                    {
                      "name": "time",
                      "displayName": "time",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.MarketTime"
                      ],
                      "required": true,
                      "key": "time"
                    }
                  ],
                  "discriminatorValue": null,
                  "orderHint": 15
                },
                "originalType": "xchg_type.Trade",
                "required": true,
                "key": "trade"
              },
              {
                "type": "object",
                "properties": [
                  {
                    "type": "string",
                    "name": "fee_amount",
                    "displayName": "fee_amount",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "A decimal monetary amount of a currency.",
                    "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                    "orderHint": 0,
                    "rawType": {
                      "name": "Amount",
                      "displayName": "Amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "6345.234",
                      "description": "A decimal monetary amount of a currency.",
                      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                      "structuredExample": {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      },
                      "orderHint": 0
                    },
                    "originalType": "xchg_type.Amount",
                    "required": true,
                    "examples": [
                      {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      }
                    ],
                    "key": "fee_amount"
                  },
                  {
                    "type": "string",
                    "name": "fee_percentage",
                    "displayName": "fee_percentage",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "A decimal monetary amount of a currency.",
                    "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                    "orderHint": 0,
                    "rawType": {
                      "name": "Amount",
                      "displayName": "Amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "6345.234",
                      "description": "A decimal monetary amount of a currency.",
                      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                      "structuredExample": {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      },
                      "orderHint": 0
                    },
                    "originalType": "xchg_type.Amount",
                    "required": true,
                    "examples": [
                      {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      }
                    ],
                    "key": "fee_percentage"
                  },
                  {
                    "type": "string",
                    "name": "fee_group_id",
                    "displayName": "fee_group_id",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "unique identifier of a FeeGroup",
                    "orderHint": 12,
                    "rawType": {
                      "name": "FeeGroupId",
                      "displayName": "FeeGroupId",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "description": "unique identifier of a FeeGroup",
                      "orderHint": 12
                    },
                    "originalType": "xchg_type.FeeGroupId",
                    "required": true,
                    "key": "fee_group_id"
                  },
                  {
                    "type": "string",
                    "name": "running_trading_volume",
                    "displayName": "running_trading_volume",
                    "typePropertyKind": "TYPE_EXPRESSION",
                    "description": "A decimal monetary amount of a currency.",
                    "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                    "orderHint": 0,
                    "rawType": {
                      "name": "Amount",
                      "displayName": "Amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "string"
                      ],
                      "example": "6345.234",
                      "description": "A decimal monetary amount of a currency.",
                      "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                      "structuredExample": {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      },
                      "orderHint": 0
                    },
                    "originalType": "xchg_type.Amount",
                    "required": true,
                    "examples": [
                      {
                        "value": "6345.234",
                        "strict": true,
                        "name": null,
                        "structuredValue": "6345.234"
                      }
                    ],
                    "key": "running_trading_volume"
                  }
                ],
                "name": "fee",
                "displayName": "fee",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "description": "fee applied account balance as part of trade settlement",
                "additionalProperties": true,
                "key": "fee"
              }
            ],
            "name": "trades",
            "displayName": "trades",
            "typePropertyKind": "TYPE_EXPRESSION",
            "description": "one or more trades if this order is SETTLED",
            "discriminatorValue": null,
            "orderHint": 17,
            "additionalProperties": true,
            "rawType": {
              "name": "TradeHistoryEntry",
              "displayName": "TradeHistoryEntry",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "object"
              ],
              "description": "Trade recorded for exactly one order",
              "properties": [
                {
                  "name": "trade",
                  "displayName": "trade",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Trade"
                  ],
                  "required": true,
                  "key": "trade"
                },
                {
                  "name": "fee",
                  "displayName": "fee",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "object"
                  ],
                  "required": true,
                  "description": "fee applied account balance as part of trade settlement",
                  "properties": [
                    {
                      "name": "fee_amount",
                      "displayName": "fee_amount",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Amount"
                      ],
                      "required": true,
                      "key": "fee_amount"
                    },
                    {
                      "name": "fee_percentage",
                      "displayName": "fee_percentage",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Amount"
                      ],
                      "required": true,
                      "key": "fee_percentage"
                    },
                    {
                      "name": "fee_group_id",
                      "displayName": "fee_group_id",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.FeeGroupId"
                      ],
                      "required": true,
                      "key": "fee_group_id"
                    },
                    {
                      "name": "running_trading_volume",
                      "displayName": "running_trading_volume",
                      "typePropertyKind": "TYPE_EXPRESSION",
                      "type": [
                        "xchg_type.Amount"
                      ],
                      "required": true,
                      "key": "running_trading_volume"
                    }
                  ],
                  "key": "fee"
                }
              ],
              "discriminatorValue": null,
              "orderHint": 17
            },
            "originalType": "history.TradeHistoryEntry",
            "required": false,
            "key": "trades"
          }
        ],
        "name": "OrderHistoryEntry",
        "displayName": "OrderHistoryEntry",
        "typePropertyKind": "TYPE_EXPRESSION",
        "description": "active or inactive order, for orders with the status __FILLED__, __FILLED_FULLY__, __FILLED_CLOSED__ and __FILLED_REJECTED__, information about trades and fees is returned.",
        "discriminatorValue": null,
        "orderHint": 18,
        "additionalProperties": true,
        "rawType": {
          "name": "OrderHistoryEntry",
          "displayName": "OrderHistoryEntry",
          "typePropertyKind": "TYPE_EXPRESSION",
          "type": [
            "object"
          ],
          "description": "active or inactive order, for orders with the status __FILLED__, __FILLED_FULLY__, __FILLED_CLOSED__ and __FILLED_REJECTED__, information about trades and fees is returned.",
          "properties": [
            {
              "name": "order",
              "displayName": "order",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "xchg_type.Order"
              ],
              "required": true,
              "key": "order"
            },
            {
              "name": "trades",
              "displayName": "trades",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "history.TradeHistoryEntry"
              ],
              "required": false,
              "description": "one or more trades if this order is SETTLED",
              "key": "trades"
            }
          ],
          "discriminatorValue": null,
          "orderHint": 18
        },
        "originalType": "history.OrderHistoryEntry"
      },
      "name": "order_history",
      "displayName": "order_history",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "order_history"
    },
    "max_page_size": {
      "type": "integer",
      "name": "max_page_size",
      "displayName": "max_page_size",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "maximum number of returned results if this is a paginated response",
      "key": "max_page_size"
    },
    "cursor": {
      "type": "string",
      "name": "cursor",
      "displayName": "cursor",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "cursor designating current position if this is a paginated response and there are more results available",
      "key": "cursor"
    }
  }
}

TradeHistory

Paginated collection of account trades


Properties

TYPE DEFINITION

{
  "name": "TradeHistory",
  "type": "object",
  "description": "Paginated collection of account trades",
  "properties": {
    "trade_history": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": [
          {
            "type": "object",
            "properties": [
              {
                "type": "string",
                "name": "trade_id",
                "displayName": "trade_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "key": "trade_id"
              },
              {
                "type": "string",
                "name": "order_id",
                "displayName": "order_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "key": "order_id"
              },
              {
                "type": "string",
                "name": "account_id",
                "displayName": "account_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "key": "account_id"
              },
              {
                "type": "string",
                "name": "amount",
                "displayName": "amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "amount"
              },
              {
                "type": "string",
                "name": "side",
                "displayName": "side",
                "typePropertyKind": "TYPE_EXPRESSION",
                "required": true,
                "enum": [
                  "BUY",
                  "SELL"
                ],
                "key": "side"
              },
              {
                "type": "string",
                "name": "instrument_code",
                "displayName": "instrument_code",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                "pattern": "^[A-Z]+_[A-Z]+$",
                "orderHint": 4,
                "rawType": {
                  "name": "Instrument",
                  "displayName": "Instrument",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "BTC_EUR",
                  "description": "The instrument denotes the exchange of one currency for another. Both __base__ and __quote__ must be __valid__ currency codes.",
                  "pattern": "^[A-Z]+_[A-Z]+$",
                  "structuredExample": {
                    "value": "BTC_EUR",
                    "strict": true,
                    "name": null,
                    "structuredValue": "BTC_EUR"
                  },
                  "orderHint": 4
                },
                "originalType": "xchg_type.Instrument",
                "required": true,
                "examples": [
                  {
                    "value": "BTC_EUR",
                    "strict": true,
                    "name": null,
                    "structuredValue": "BTC_EUR"
                  }
                ],
                "key": "instrument_code"
              },
              {
                "type": "string",
                "name": "price",
                "displayName": "price",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "price"
              },
              {
                "type": "datetime",
                "name": "time",
                "displayName": "time",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                "format": "rfc3339",
                "orderHint": 1,
                "rawType": {
                  "name": "MarketTime",
                  "displayName": "MarketTime",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "datetime"
                  ],
                  "example": "2017-10-05T16:01:41.090Z",
                  "description": "Zoned date time value which adheres to [RFC3339](https://www.ietf.org/rfc/rfc3339.txt). All market times are in UTC.",
                  "format": "rfc3339",
                  "structuredExample": {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  },
                  "orderHint": 1
                },
                "originalType": "xchg_type.MarketTime",
                "required": true,
                "examples": [
                  {
                    "value": "2017-10-05T16:01:41.090Z",
                    "strict": true,
                    "name": null,
                    "structuredValue": "2017-10-05T16:01:41.090Z"
                  }
                ],
                "key": "time"
              }
            ],
            "name": "trade",
            "displayName": "trade",
            "typePropertyKind": "TYPE_EXPRESSION",
            "discriminatorValue": null,
            "orderHint": 15,
            "additionalProperties": true,
            "rawType": {
              "name": "Trade",
              "displayName": "Trade",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "object"
              ],
              "properties": [
                {
                  "name": "trade_id",
                  "displayName": "trade_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "key": "trade_id"
                },
                {
                  "name": "order_id",
                  "displayName": "order_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "key": "order_id"
                },
                {
                  "name": "account_id",
                  "displayName": "account_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "key": "account_id"
                },
                {
                  "name": "amount",
                  "displayName": "amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "key": "amount"
                },
                {
                  "name": "side",
                  "displayName": "side",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "required": true,
                  "enum": [
                    "BUY",
                    "SELL"
                  ],
                  "key": "side"
                },
                {
                  "name": "instrument_code",
                  "displayName": "instrument_code",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Instrument"
                  ],
                  "required": true,
                  "key": "instrument_code"
                },
                {
                  "name": "price",
                  "displayName": "price",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "key": "price"
                },
                {
                  "name": "time",
                  "displayName": "time",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.MarketTime"
                  ],
                  "required": true,
                  "key": "time"
                }
              ],
              "discriminatorValue": null,
              "orderHint": 15
            },
            "originalType": "xchg_type.Trade",
            "required": true,
            "key": "trade"
          },
          {
            "type": "object",
            "properties": [
              {
                "type": "string",
                "name": "fee_amount",
                "displayName": "fee_amount",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "fee_amount"
              },
              {
                "type": "string",
                "name": "fee_percentage",
                "displayName": "fee_percentage",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "fee_percentage"
              },
              {
                "type": "string",
                "name": "fee_group_id",
                "displayName": "fee_group_id",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "unique identifier of a FeeGroup",
                "orderHint": 12,
                "rawType": {
                  "name": "FeeGroupId",
                  "displayName": "FeeGroupId",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "description": "unique identifier of a FeeGroup",
                  "orderHint": 12
                },
                "originalType": "xchg_type.FeeGroupId",
                "required": true,
                "key": "fee_group_id"
              },
              {
                "type": "string",
                "name": "running_trading_volume",
                "displayName": "running_trading_volume",
                "typePropertyKind": "TYPE_EXPRESSION",
                "description": "A decimal monetary amount of a currency.",
                "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                "orderHint": 0,
                "rawType": {
                  "name": "Amount",
                  "displayName": "Amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "string"
                  ],
                  "example": "6345.234",
                  "description": "A decimal monetary amount of a currency.",
                  "pattern": "^[+-]?\\d+(\\.\\d*)?$",
                  "structuredExample": {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  },
                  "orderHint": 0
                },
                "originalType": "xchg_type.Amount",
                "required": true,
                "examples": [
                  {
                    "value": "6345.234",
                    "strict": true,
                    "name": null,
                    "structuredValue": "6345.234"
                  }
                ],
                "key": "running_trading_volume"
              }
            ],
            "name": "fee",
            "displayName": "fee",
            "typePropertyKind": "TYPE_EXPRESSION",
            "required": true,
            "description": "fee applied account balance as part of trade settlement",
            "additionalProperties": true,
            "key": "fee"
          }
        ],
        "name": "TradeHistoryEntry",
        "displayName": "TradeHistoryEntry",
        "typePropertyKind": "TYPE_EXPRESSION",
        "description": "Trade recorded for exactly one order",
        "discriminatorValue": null,
        "orderHint": 17,
        "additionalProperties": true,
        "rawType": {
          "name": "TradeHistoryEntry",
          "displayName": "TradeHistoryEntry",
          "typePropertyKind": "TYPE_EXPRESSION",
          "type": [
            "object"
          ],
          "description": "Trade recorded for exactly one order",
          "properties": [
            {
              "name": "trade",
              "displayName": "trade",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "xchg_type.Trade"
              ],
              "required": true,
              "key": "trade"
            },
            {
              "name": "fee",
              "displayName": "fee",
              "typePropertyKind": "TYPE_EXPRESSION",
              "type": [
                "object"
              ],
              "required": true,
              "description": "fee applied account balance as part of trade settlement",
              "properties": [
                {
                  "name": "fee_amount",
                  "displayName": "fee_amount",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "key": "fee_amount"
                },
                {
                  "name": "fee_percentage",
                  "displayName": "fee_percentage",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "key": "fee_percentage"
                },
                {
                  "name": "fee_group_id",
                  "displayName": "fee_group_id",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.FeeGroupId"
                  ],
                  "required": true,
                  "key": "fee_group_id"
                },
                {
                  "name": "running_trading_volume",
                  "displayName": "running_trading_volume",
                  "typePropertyKind": "TYPE_EXPRESSION",
                  "type": [
                    "xchg_type.Amount"
                  ],
                  "required": true,
                  "key": "running_trading_volume"
                }
              ],
              "key": "fee"
            }
          ],
          "discriminatorValue": null,
          "orderHint": 17
        },
        "originalType": "history.TradeHistoryEntry"
      },
      "name": "trade_history",
      "displayName": "trade_history",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": true,
      "key": "trade_history"
    },
    "max_page_size": {
      "type": "integer",
      "name": "max_page_size",
      "displayName": "max_page_size",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "maximum number of returned results if this is a paginated response",
      "key": "max_page_size"
    },
    "cursor": {
      "type": "string",
      "name": "cursor",
      "displayName": "cursor",
      "typePropertyKind": "TYPE_EXPRESSION",
      "required": false,
      "description": "cursor designating current position if this is a paginated response and there are more results available",
      "key": "cursor"
    }
  }
}

/account

Accounts is a private exchange resource. Registered users who wish to interact with the Bitpanda Exchange must have a valid account.


/balances get

GET: /account/balances (secured)

Returns the balance details for an account.


Possible Responses

200


/balances get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/balances" \
	-H "Authorization: Bearer apiKey"

RESPONSE BODY

200

{
  "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
  "balances": [
    {
      "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
      "currency_code": "BTC",
      "chhange": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 5,
      "time": "2019-04-01T13:39:17.155Z"
    },
    {
      "account_id": "e4eaaaf2-d142-11e1-b3e4-080027620cdd",
      "currency_code": "ETH",
      "change": "0.50000000",
      "available": "10.0",
      "locked": "1.1234567",
      "sequence": 5,
      "time": "2019-04-01T13:39:17.155Z"
    }
  ]
}
Type
object


/fees get

GET: /account/fees (secured)

Returns the fee details for an account.


Possible Responses

200


/fees get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/fees" \
	-H "Authorization: Bearer apiKey"


/orders get

GET: /account/orders (secured)

Return a paginated report on currently open orders, sorted by timestamp (newest first). Use query parameters and filters to specify if historical orders should be reported as well. If no query filters are defined it returns all orders which are currently active. If you want to query specific time frame parameters, FROM and TO are mandatory, otherwise it will start from the newest orders. The maximum time-frame you can query at one time is 100 days.


Query Parameters

from

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredfalse
typedatetime
examples2017-10-05T16:01:41.090Z

to

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredfalse
typedatetime
examples2017-10-05T16:01:41.090Z

instrument_code

Filter order history by instrument_code

PropertyValue
requiredfalse
typestring
examplesBTC_EUR

with_cancelled_and_rejected

Return orders which have been cancelled by the user before getting filled or rejected by the system as invalid. Additionally, all inactive filled orders which would "with_just_filled_inactive" return.

PropertyValue
requiredfalse
typeboolean
examplestrue

with_just_filled_inactive

Return order history for orders which have been filled and are no longer open. Use of "with_cancelled_and_rejected" extends "with_just_filled_inactive" and in case both are specified the latter is ignored.

PropertyValue
requiredfalse
typeboolean
examplestrue

max_page_size

Set max desired page size. If no value is provided, it defaults to 100 results per page. The maximum upper limit of results per page is 100.

PropertyValue
requiredfalse
typestring

cursor

Pointer specifying the position from which the next pages should be returned.

PropertyValue
requiredfalse
typestring

Possible Responses

200


/orders get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/orders?from=2017-10-05T16:01:41.090Z&to=2017-10-05T16:01:41.090Z&instrument_code=BTC_EUR&with_cancelled_and_rejected=true&with_just_filled_inactive=true" \
	-H "Authorization: Bearer apiKey"

/orders post

POST: /account/orders (secured)

Create a new order of the type LIMIT, MARKET or STOP. There is a minimum size per order which can be looked up by querying the /instruments endpoint. Additionally, the precision limitations can be found there.


Possible Responses

200

422


/orders post

CURL EXAMPLE

curl -X POST "https://api.exchange.bitpanda.com/public/v1/account/orders" \
	-H "Authorization: Bearer apiKey" \
	-d @request_body

REQUEST BODY

Create Market Order

{
  "instrument_code": "BTC_EUR",
  "side": "BUY",
  "type": "MARKET",
  "amount": "1.23"
}

Create Limit Order

{
  "instrument_code": "BTC_EUR",
  "side": "BUY",
  "type": "LIMIT",
  "amount": "1.23",
  "price": "5000.00"
}

Create Stop Order

{
  "instrument_code": "BTC_EUR",
  "side": "SELL",
  "type": "STOP",
  "amount": "1",
  "price": "4999.99",
  "trigger_price": "5000"
}
Type
object

RESPONSE BODY

200

{
  "order_id" : "d5492c24-2995-4c18-993a-5b8bf8fffc0d",
  "account_id": "a4c699f6-338d-4a26-941f-8f9853bfc4b9",
  "instrument_code": "BTC_EUR",
  "time": "2019-08-01T08:00:44.026Z",
  "side": "BUY",
  "price": "5000",
  "amount": "1",
  "filled_amount": "0.5",
  "type": "LIMIT"
}
Type
object

/orders delete

DELETE: /account/orders (secured)

Close all orders


Query Parameters

instrument_code

Only close orders in given market (omit to close all orders)

PropertyValue
requiredfalse
typestring
examplesBTC_EUR

Possible Responses

200


/orders delete

CURL EXAMPLE

curl -X DELETE "https://api.exchange.bitpanda.com/public/v1/account/orders?instrument_code=BTC_EUR" \
	-H "Authorization: Bearer apiKey"

RESPONSE BODY

200

[
  "d1efc79d-f78d-4a9d-a4c0-dbe76c9a4e6f",
  "8ada8f2d-56ea-4b24-bfd4-06723dfbb3be",
  "82d36d62-9d02-4154-8686-9b16472a4a38",
  "09759fa5-8b3a-47e7-a8c7-a0833b749855",
  "6eb6a84a-eca9-4348-8c2d-cac1a18e81e7"
]
Type
array


/{orderId} get

GET: /account/orders/{orderId} (secured)

Get information for an order


URI Parameters

orderId

PropertyValue
requiredtrue
typestring

order_id

PropertyValue
requiredtrue
typestring

Possible Responses

200


/{orderId} get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/orders/{orderId}" \
	-H "Authorization: Bearer apiKey"

RESPONSE BODY

200

{
  "order_id" : "36bb2437-7402-4794-bf26-4bdf03526439",
  "account_id": "a4c699f6-338d-4a26-941f-8f9853bfc4b9",
  "instrument_code": "BTC_EUR",
  "amount" : "10",
  "filled_amount": "0",
  "side" : "BUY",
  "type" : "LIMIT",
  "time" : "2017-10-05T16:22:07Z",
  "price" : "3758.29",
  "sequence": 1
}
Type
object

/{orderId} delete

DELETE: /account/orders/{orderId} (secured)

Close an order


URI Parameters

orderId

PropertyValue
requiredtrue
typestring

order_id

PropertyValue
requiredtrue
typestring

Possible Responses

204


/{orderId} delete

CURL EXAMPLE

curl -X DELETE "https://api.exchange.bitpanda.com/public/v1/account/orders/{orderId}" \
	-H "Authorization: Bearer apiKey"


/trades get

GET: /account/orders/{orderId}/trades (secured)

Get trade information for a specific order.


URI Parameters

orderId

PropertyValue
requiredtrue
typestring

order_id

PropertyValue
requiredtrue
typestring

Possible Responses

200


/trades get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/orders/{orderId}/trades" \
	-H "Authorization: Bearer apiKey"


/trades get

GET: /account/trades (secured)

Return a paginated report on past trades, sorted by timestamp (newest first). If no query parameters are defined, it returns the last 100 trades.


Query Parameters

from

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredfalse
typedatetime
examples2017-10-05T16:01:41.090Z

to

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredfalse
typedatetime
examples2017-10-05T16:01:41.090Z

instrument_code

Filter order history by instrument_code

PropertyValue
requiredfalse
typestring

max_page_size

Set max desired page size. If no value is provided, by default a maximum of 100 results per page are returned. The maximum upper limit is 100 results per page.

PropertyValue
requiredfalse
typestring

cursor

Pointer specifying the position from which the next pages should be returned.

PropertyValue
requiredfalse
typestring

Possible Responses

200


/trades get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/trades?from=2017-10-05T16:01:41.090Z&to=2017-10-05T16:01:41.090Z" \
	-H "Authorization: Bearer apiKey"


/{trade_id} get

GET: /account/trades/{trade_id} (secured)

Get information for a trade.


URI Parameters

trade_id

PropertyValue
requiredtrue
typestring

Possible Responses

200


/{trade_id} get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/trades/{trade_id}" \
	-H "Authorization: Bearer apiKey"

RESPONSE BODY

200

{
  "trade": {
    "account_id": "23aa7d81-5fc4-42c6-ac97-7dd7ecd63d84",
    "amount": "0.005",
    "instrument_code": "BTC_EUR",
    "order_id": "ddc8f5a1-f69d-4ce6-ac22-a0ab016fa655",
    "price": "3624.2",
    "sequence": 1,
    "side": "BUY",
    "time": "2019-01-08T14:08:05.461Z",
    "trade_id": "8d20e3b3-c580-4a9b-8923-3b032cdf8ec4"
  },
  "fee": {
    "fee_amount": "0.00001250",
    "fee_currency": "BTC",
    "fee_group_id": "default",
    "fee_percentage": "0.25",
    "fee_type": "TAKER",
    "running_trading_volume": "10.0"
  }
}
Type
object


/trading-volume get

GET: /account/trading-volume (secured)

Returns the running trading volume for this account. It is calculated over a 30 day running window and updated once every 24hrs.


Possible Responses

200


/trading-volume get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/account/trading-volume" \
	-H "Authorization: Bearer apiKey"

/currencies


/currencies get

GET: /currencies

Get a list of all available currencies.


Possible Responses

200


/currencies get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/currencies"

/candlesticks


/{instrument_code} get

GET: /candlesticks/{instrument_code}

Get instrument's candlesticks for a closed time period.


URI Parameters

instrument_code

The instrument denotes the exchange of one currency for another. Both base and quote must be valid currency codes.

PropertyValue
requiredtrue
typestring
examplesBTC_EUR

Query Parameters

unit

unit of TimeGranularity

PropertyValue
requiredtrue
typestring
oneOfMINUTES, HOURS, DAYS, WEEKS, MONTHS

period

period of TimeGranularity

PropertyValue
requiredtrue
typenumber
oneOf1, 4, 5, 15, 30

from

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredtrue
typedatetime
examples2017-10-05T16:01:41.090Z

to

Zoned date time value which adheres to RFC3339. All market times are in UTC.

PropertyValue
requiredtrue
typedatetime
examples2017-10-05T16:01:41.090Z

Possible Responses

200


/{instrument_code} get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/candlesticks/{instrument_code}?from=2017-10-05T16:01:41.090Z&to=2017-10-05T16:01:41.090Z"

/fees


/fees get

GET: /fees

Returns details of all publicly-visible Fee Groups.


Possible Responses

200


/fees get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/fees"

/instruments

Instruments is a public exchange resource encompassing information about tradeable assets.


/instruments get

GET: /instruments

Get a list of all available trade instruments


Possible Responses

200


/instruments get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/instruments"

/order-book


/{instrument_code} get

GET: /order-book/{instrument_code}

Get given instrument's order book.


URI Parameters

instrument_code

The instrument denotes the exchange of one currency for another. Both base and quote must be valid currency codes.

PropertyValue
requiredtrue
typestring
examplesBTC_EUR

Query Parameters

level

Specifies which level of orderbook should be returned. Level 1 means only best bid and ask, level 2 is a compiled orderbook up to market precision and level 3 is a full orderbook. Orderbook level 3 is returned if no level is specified. If you wish to get regular updates about orderbooks please use our Websocket channel. Heavy usage of this endpoint may result in limited access according to our rate limits rules.

PropertyValue
requiredfalse
typenumber
examples1

Possible Responses

200


/{instrument_code} get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/order-book/{instrument_code}?level=1"

RESPONSE BODY

level-1 200

Example response for level 1 orderbook snapshot.

{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": {
    "price": "8888.0",
    "amount": "16.464",
    "number_of_orders": 3
  },
  "asks": {
    "price": "9449.0",
    "amount": "54.46",
    "number_of_orders": 23
  }
}

level-2 200

Example response for level 2 orderbook snapshot.

{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": [
    {
      "price": "8673.0",
      "amount": "14.48",
      "number_of_orders": 2
    },
    {
      "price": "8670.0",
      "amount": "6.354",
      "number_of_orders": 12
    }
  ],
  "asks": [
    {
      "price": "8978.0",
      "amount": "624.24",
      "number_of_orders": 124
    },
    {
      "price": "9757.0",
      "amount": "12.7",
      "number_of_orders": 7
    }
  ]
}

level-3 200

Examples response for level 3 orderbook snapshot.

{
  "instrument_code": "BTC_EUR",
  "time": "2019-07-08T18:01:39.106Z",
  "bids": [
    {
      "price": "8882.0",
      "amount": "0.1156316",
      "order_id": "e10c6e89-d722-48c2-849b-9a51a470c5e1"
    }
  ],
  "asks": [
    {
      "price": "8945.4",
      "amount": "0.1",
      "order_id": "7b3b4a81-592d-4dc2-be1e-3f01e3daf8bd"
    },
    {
      "price": "8945.9",
      "amount": "0.95574218",
      "order_id": "7950480f-6264-48d9-b754-a4be4bbd0d74"
    }
  ]
}
Type
object

/time


/time get

GET: /time

Returns current server time


Possible Responses

200


/time get

CURL EXAMPLE

curl -X GET "https://api.exchange.bitpanda.com/public/v1/time"

RESPONSE BODY

200

{
  "iso": "2018-12-11T10:58:41.219Z",
  "epoch_millis": 1544525921219
}
Type
object