Welcome to the BSDEX HTTP API Documentation
In order to use the API, you need add the following headers in your HTTP requests:
You can calculate the value of $SIGNATURE by sha1 HMAC of the string "date: $DATE" in base 64.
Example:
#!/bin/bashBSDEX_API_KEY=put-your-api-key-hereBSDEX_API_SECRET=put-your-api-secret-hereDATE="`date -u '+%a, %d %b %Y %T %Z'`"# The signature is in fact HMAC signature of a few fields, currently only "date", using your API secret.AUTHORIZATION="hmac username=\"$BSDEX_API_KEY\", algorithm=\"hmac-sha1\", headers=\"date\", signature=\"`/bin/echo -n "date: ${DATE}" | openssl sha1 -binary -hmac "${BSDEX_API_SECRET}" | base64 `\""curl -v \-H "Date: $DATE" \-H "ApiKey: $BSDEX_API_KEY" \-H "Authorization: $AUTHORIZATION" \-X GET "https://api-public.bsdex.de/api/v1/balance"
And you'll receive a response such as:
[{"asset_id": "btc","available": "0","locked": "0"},{"asset_id": "eur","available": "34163","locked": "123"}]
For all API requests, "Date", "ApiKey" and "Authorization" headers must be present.
If self-trade prevention is enabled for your account, the trading engine prevents two ordrs of the same user to match. This is done by cancelling the aggressive order. The 'cancelled_reason' field of the cancelled order will be set to "self_trade". Note that the aggressive order can be partially filled before being cancelled due to self trade.
At any point in time, a BSDEX market operates within a phase. By subscribing to the phases
channel for a market, you get the current phase as well as changes to the phase:
{"type": "subscribe","chan_name": "phases","subchan_name": "btc-eur"}
And the server responds with:
{"chan_name": "phases","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "phases","subchan_name": "btc-eur","type": "online"}{"chan_name": "phases","subchan_name": "btc-eur","type": "data","data": {"name": "continuous-trading","start_ts": 1723456449279064870}}
Which means the market is in continuous trading phase at the moment. See section Trading Phases for an explanation of each trading phase. For more details about the phases channels behavior see section Phases Channel.
You can get the same payload by calling the current phase's HTTP endpoint:
GET /api/v1/btc-eur/phases/current
For more details about this REST API endpoint see section Get current market phase.
In continuous trading phase, orders continuously get matched. However in certain situations, the market enters an auction. This could happen when:
In such case, the market enters auction "call" phase. During an auction, no trade takes place and the orderbook may be crossed.
A message is sent to the phases channel:
{"chan_name": "phases","subchan_name": "btc-eur","type": "data","data": {"name": "auction-call","start_ts": 1723456534127110500}}
Auction "call" phases has a fixed duration after which, the market enters auction "price" phase, which has a random length. During auction call and price phase, the auction
channel provides information on the current state of the auction.
If the orderbook is crossed, this channel receives the hypothetical auction price with volume and surplus values:
{"chan_name":"auction","subchan_name":"btc-eur","type":"data","data":{"auction_price":"9500.50", "auction_volume":"20.2", "surplus": "0.8", "surplus_side":"buy", "market": "btc-eur"}}
This means that if the auction were to end at the hypoehtical auction price of 9500.50, 20.20 worth of base asset will be traded and "0.8" worth of base asset in surplus will remain outstanding. Auction volume and surplus will continually reflect the liquidity that's being added or removed during the auction call and price phases. Note that a "surplus_side" of "none" means there is no surplus.
On the other hand, if the orderbook is not crossed, this channel receives information on top of the book:
{"chan_name":"auction","subchan_name":"btc-eur","type":"data","data":{"buy_price":"9500.00", "buy_volume":"20.2", "sell_price": "9510.10", "sell_volume":"1.11", "market": "btc-eur"}}
continuous-trading
- Clients can post orders and orders get matched continuously. Orderbook will always be uncrossed.auction-call
- The auction starts in the "auction-call" phase. Clients can post orders but orders do not match. Consequently, the orderbook may be crossed at times. The length of auction call phase is fixed and once it ends, the "auction-price" phase starts.auction-price
- The "auction-price" phase behaves similarly to auction-call phase except that it has a random but bounded length. At the end of "auction-price" phase, if the orderbook is not crossed, the market enters the "continuous-trading" phase. However, if the orderbook is crossed (i.e. there are orders to martch), the auction price will be determined as the price with highest turnover and lowest surplus. If the auction price is within an acceptable band around of the asset's price in other markets, the auction ends with the execution of orders and it enters the "continuous-trading" phase. If the auction price is not within an acceptable band of the asset's price, the market enters "auction-recall" phase.auction-recall
- In this phase, having entered from the "auction-price" phase with a crossed order book but without an acceptable price, clients can post orders and as soon as the would-be auction price is within the acceptable range, or the order book is uncrossed, the "auction-recall" phase goes back to the "auction-price" phase.system-down
- Clients can post orders but orders does not match. The "system-down" phase ends into the "auction-call" phase when the market reopens.suspended
- Market is suspended and all orders are deleted from the system. Clients cannot post orders.trading-halt
- Market is temporarily halted. Clients can post orders but orders does not match. The "trading-halt" phase ends into the "auction-call" phase when the market resumes.continuous-trading
phase.auction-call
, auction-price
and auction-recall
phases. The client may adjust the volume of the quote based on the amount of surplus reported in the auction WebSocket channel.trading-halt
and system-down
phases.suspended
phase, as orders have already been cancelled.In case the HMAC authentication does not work, you might receive the following errors:
Status Code | Error Message | Description |
---|---|---|
401 | Invalid authentication credentials | You are using an invalid API key. |
401 | HMAC signature does not match | You are using an invalid API secret or there is something wrong with your generation of the signature. |
401 | The access token is invalid or has expired | The route you are accessing has not configured HMAC authentication. Maybe you are not accessing the api-public subdomain. |
401 | Your IP address is not allowed | The IP address you are using is not allowed for this API key. Also check whether you are using IPv6 instead of IPv4. |
Response level errors are present when the HTTP response payload will be structured like this:
{"id": "09ae20b4bcdf13da88558fb5bb8b0399","status": 418,"code": "I'm a teapot","detail": "still a teapot", // optional"source": {"field": "fld","message": "msg"} // optional}
Each error object contains "id", which is the internal bsdex request id associated with the HTTP request, "status" the string representation of http status code or an internal service level key, "code" the string representation of the http status code. The object also contains optional field "detail", which explains the actual error. 400 Bad request errors contain the sub object "source", which contains the "field" with the invalid value & "message" that explains it.
Response Code | Code | Comment |
---|---|---|
400 | invalid_order_request | "field" in the "source" object contains the field with the invalid value |
400 | invalid_order_request | Bulk request payload should specify the orders to be cancelled using one of only cancel or cancel_client_ids . "field" in source object would contain value of cancel and "message" would have text "only one of cancel or cancel_client_ids can be used" |
400 | invalid_order_request | Bulk request payload cannot contain more than 10 orders to be inserted and 10 to be cancelled. "field" would contain value of body and the "message" would contain text "only 10 orders and 10 cancels can be issued within bulk" |
400 | invalid_order_request | For creating a single order request, a 400 error response payload would contain the "source" object with the invalid "field" and "message" specified |
400 | order_validation | For Bulk request, if an order to be inserted contains an already used client id, then "source" object would contain "field" with value "client_id" and "message" contains text "client_id exists" |
400 | insufficient_funds | "detail" field would contain the error message |
500 | bookkeeping_service | "detail" field would contain the specific error message, but this generally means placing the order failed because of failed fund management. |
500 | order_service | "detail" would contain the specific internal failure. All order_service failures mean that order or bulk api request has failed and client should retry |
503 | passive_mode | The Orderbook is currently in Passive Mode. Please refer to the section on Auctions and Phases. |
BSDEX offers a WebSockets API to subscribe to real-time data. You need to authenticate similar to HTTP endpoints.
The following example uses a command line tool "websocat". Please download the tool to run the examples below.
#!/bin/bashBSDEX_API_KEY=put-your-api-key-hereBSDEX_API_SECRET=put-your-api-secret-hereDATE="`date -u '+%a, %d %b %Y %T %Z'`"AUTHORIZATION="hmac username=\"$BSDEX_API_KEY\", algorithm=\"hmac-sha1\", headers=\"date\", signature=\"`/bin/echo -n "date: ${DATE}" | openssl sha1 -binary -hmac "${BSDEX_API_SECRET}" | base64 `\""websocat wss://api-public.bsdex.de/api/v1/ws -H "Date: $DATE" -H "ApiKey: $BSDEX_API_KEY" -H "Authorization: $AUTHORIZATION"
If the connection and authentication are successful, you're given an interactive shell. Try subscribing to the orderbook channel:
{"type":"subscribe","chan_name":"orderbook","subchan_name":"btc-eur"}
Which subsequently you'll receive a full orderbook folllowed by real-time changes to the orderbook:
{"chan_name":"orderbook","subchan_name":"btc-eur","type":"subscribed"}{"chan_name":"orderbook","subchan_name":"btc-eur","type":"online"}{"chan_name":"orderbook","subchan_name":"btc-eur","type":"data","data":[{"price":"53119.54","side":"sell","size":"0.001","market":"btc-eur","order_count":1},{"price":"52794.86","side":"buy","size":"0.001","market":"btc-eur","order_count":1}],"meta":{"dti":"4H95J0R2X","asset_name":"Bitcoin","price_curr":"BTC/EUR","price_nota":"MONE","quantity_nota":"UNIT","venue":"XDEX","system":"HYBR","published_at":"2024-08-08T14:20:42.452792Z"}}{"chan_name":"orderbook","subchan_name":"btc-eur","type":"data","data":[{"price":"53119.54","side":"sell","size":"0","market":"btc-eur","order_count":0},{"price":"53103.44","side":"sell","size":"0.001","market":"btc-eur","order_count":1},{"price":"52794.86","side":"buy","size":"0.001","market":"btc-eur","order_count":1}],"meta":{"dti":"4H95J0R2X","asset_name":"Bitcoin","price_curr":"BTC/EUR","price_nota":"MONE","quantity_nota":"UNIT","venue":"XDEX","system":"HYBR","published_at":"2024-08-08T14:20:54.022131Z"}}
Client can ping server to determine whether connection is alive, server responds with pong. This is an application level ping as opposed to default ping in websockets standard which is server initiated It is ideal to use ping to avoid disconnection if no messages are received within the configured idle timeout
{"type": "ping"}
Response:
{"type": "pong"}
See this section for details.
To limit load there is a hard limit of 400 websocket connections which can simultaneosly be opened per user account. Once this limit is reached any new connection will receive the below error message, after which the connection is terminated from server-side.
# Error Message{"type": "error","data": {"message": "maximum amount of websocket connections reached"}}
Due to replication and routing in some edge cases this message can already occur on new connection creation from 200 active connections onwards.
Clients can use the session message to manage the current websocket session.
Below flags are currently supported
enable_cancel_on_disconnect
: Enables or disables batch cancellation of all open orders if the users websocket session is disconnected. Default: false
idle_timeout
: Time interval in seconds until the gateway disconnects the session if no data has been exchanged between server and client. Default: 60s
To avoid automatic disconnects after idle_timeout
, the client should send periodic ping messages as described above.
{"type": "session","data": {"enable_cancel_on_disconnect": true,"idle_timeout": 60}}
Provides orderbook state and changes per subscribed market.
The first message of type data
after subscribing will contain a complete snapshot of the current orderbook. Followup messages are delta updates that a client should apply to the internal orderbook representation in order to keep it up-to-date.
# Subscribe via{"type": "subscribe","chan_name": "orderbook","subchan_name": "btc-eur","params": {#optional flag to avoid disconnect when feed goes offline during auction#false by default. Set true to avoid disconnection"keep_alive_when_offline": true}}# Response{"chan_name": "orderbook","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "orderbook","subchan_name": "btc-eur",# feed status -- online or offline"type": "online"}# Orderbook Message{"chan_name": "orderbook","subchan_name": "btc-eur","type": "data","data": [{"price": "61812.91","side": "buy","size": "1","market": "btc-eur","order_count": 3},{"price": "62012.3","side": "sell","size": "0.15","market": "btc-eur""order_count": 1}],"meta": {"dti": "4H95J0R2X","asset_name": "Bitcoin","price_curr": "BTC/EUR","price_nota": "MONE","quantity_nota": "UNIT","venue": "XDEX","system": "HYBR","published_at": "2023-07-17T16:34:09.783483Z"}}
Contains real-time changes to top of the books
# Subscribe via{"type": "subscribe","chan_name": "quote","subchan_name": "btc-eur"}# Response{"chan_name": "quote","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "quote","subchan_name": "btc-eur","type": "online"}# Quote message{"chan_name": "quote","subchan_name": "btc-eur","type": "data","data": {"buy_price": "48649.27","buy_volume": "0.01","sell_price": "48701.74","sell_volume": "0.01","market": "btc-eur"}}
Contains information about phase changes, such as "continuous-trading", "auction-call" or "auction-price". The start
timestamp start_ts
is given in nanoseconds since Unix epoch. After successful subscription, an initial message stating
the currently active phase is sent. The start timestamp of this initial phase is typically further in the past since it
started before the client subscribed to the channel. All other phase messages represent live updates and therefore
typically carry a more recent timestamp.
# Subscribe{"type": "subscribe","chan_name": "phases","subchan_name": "btc-eur"}# Subscription response{"chan_name": "phases","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "phases","subchan_name": "btc-eur","type": "online"}# Initial phase active during subscribe request (start_ts is typically further in the past since the phase started before the client subscribed){"chan_name": "phases","subchan_name": "btc-eur","type": "data","data": {"name": "continuous-trading","start_ts": 1723456449279064870}}# 1st phase update after subscribing (start_ts is more recent){"chan_name": "phases","subchan_name": "btc-eur","type": "data","data": {"name": "auction-call","start_ts": 1723456534127110500}}# 2nd phase update after subscribing (start_ts is more recent){"chan_name": "phases","subchan_name": "btc-eur","type": "data","data": {"name": "auction-price","start_ts": 1723456547141235724}}
Contains information about public trades.
# Subscribe via{"type": "subscribe","chan_name": "public_trade","subchan_name": "btc-eur"}# Response{"chan_name": "public_trade","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "public_trade","subchan_name": "btc-eur","type": "online"}# Public Trade message{"chan_name": "public_trade","subchan_name": "btc-eur","type": "data","data": [{"id": "98a831b0-b48a-4444-b926-fa0cec5a8974","executed_at": "2023-07-17T16:34:09.123456Z","local_ts": 1616393143567786800,"quantity": "0.01","price": "48677.73","market": "btc-eur",}],"meta": {"dti": "4H95J0R2X","asset_name": "Bitcoin","price_curr": "BTC/EUR","price_nota": "MONE","quantity_nota": "UNIT","venue": "XDEX","published_at": "2023-07-17T16:34:09.783483Z"}}
Contains auction information, including real-time hypothetical auction price.
# Subscribe via{"type": "subscribe","chan_name": "auction","subchan_name": "btc-eur"}# Response{"chan_name": "auction","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "public_trade","subchan_name": "btc-eur","type": "online"}# Auction message{"chan_name": "auction","subchan_name": "btc-eur","type": "data","data": {"auction_price": "61905.12","auction_volume": "0.0104","surplus": "0.98960001","surplus_side": "buy","local_ts": 1616396326042637300,"market": "btc-eur"},"meta": {"dti": "4H95J0R2X","asset_name": "Bitcoin","price_curr": "BTC/EUR","price_nota": "MONE","quantity_nota": "UNIT","venue": "XDEX","system": "HYBR","published_at": "2023-07-17T16:34:09.783483Z"}}
Contains changes to an authenticated user's own orders.
# Subscribe via{"type": "subscribe""chan_name": "order","subchan_name": "btc-eur",}# Response{"chan_name": "order","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "order","subchan_name": "btc-eur","type": "online"}# Order message{"chan_name": "order","subchan_name": "btc-eur","type": "data","data": [{"id": "98a831b0-b48a-4444-b926-fa0cec5a8974","client_id": "X_1","side": "sell", # values can be "sell" or "buy""type": "limit", # values can be "limit", "market""quantity": "0.1","price": "45000","order_status": "open", # values can be "open", "closed", "cancelled", "rejected""fill_status": "unfilled", # values can be "unfilled", "partially_filled", "filled""created_at": 1616396326042637300,"market": "btc-eur"# additional fields received for market buy order"quote_quantity": "25679.50","quote_filled": "12500",# additional fields received when order was cancelled"cancelled_at": 1616396326042637600,"cancelled_reason": "cancelled_by_user", # values can be "cancelled_by_user", "cancelled_by_market", "self_match"# additional fields received for stop order"stop_price": "44500",# additional fields received when stop order is triggered"triggered_at": 1616396326042637450,"triggered_price": "44650","triggered_reason": "last_traded_price", # values can be "last_traded_price", "highest_buy", "lowest_sell"# additional fields received after the first fill"recent_fill_quantity": "0.05", # most recently filled quantity"recent_fill_price": "45000" # price of most recent fill}],"params": {"user_id": "X"}}
Contains own trades, with more information than public_trades
# Subscribe via{"type": "subscribe""chan_name": "trade","subchan_name": "btc-eur",}# Response{"chan_name": "trade","subchan_name": "btc-eur","type": "subscribed"}{"chan_name": "trade","subchan_name": "btc-eur","type": "online"}# Private Trades message{"chan_name": "trade","subchan_name": "btc-eur","type": "data","data": {"id": "98a831b0-b48a-4444-b926-fa0cec5a8974","local_ts": 1616396326042637300,"quantity": "0.01","price": "48677.73","side": "buy","order_id": "98a831b0-b48a-4444-b926-fa0cec5a8974","client_order_id": "X_1","fee": "4.99","market": "btc-eur"},"params": {"user_id": "X"}}
Contains changes to the balance, including amounts locked for open orders.
# Subscribe via{"type": "subscribe","chan_name": "balance""subchan_name": "btc",}# Response{"chan_name": "balance","subchan_name": "btc","type": "subscribed"}{"chan_name": "balance","subchan_name": "btc","type": "online"}# Balance Update message{"chan_name": "balance","subchan_name": "btc","type": "data","data": {"asset_id": "btc","available": "0.102","locked": "1.1",},"params": {"user_id": "X"}}
Clients receive the availability of a certain real-time feed via status messages. The current status of a channel, subchannel feed is received immediately after subscription. Clients are responsible for implementing their own rules when feed status messages are received. For example, clearing cached orderbook data when the orderbook channel goes offline.
{"chan_name": "orderbook","subchan_name": "btc-eur","type": "online" # values can be "online", "offline"}
To enforce clearing of context/data cached for a websocket connection, the gateway disconnects clients who are subscribed to a channel that goes offline. To keep the connection alive, without the above disconnection, please set the keep_alive_when_offline optional flag to true, in the subscribe message.
{"type": "subscribe","chan_name": "orderbook","subchan_name": "btc-eur","params": {"keep_alive_when_offline": true}}
Version 0.6 (beta)
BSDEX provides a FIX API for order management. The specification is based on FIX 4.4.
The FIX API:
ResendRequest
.Supported messages are defined in the sections below. Messages are based on Fix 4.4. with some custom adaptions.
For example, a field that is optional in the Fix standard can be mandatory here and the other way around.
The table below gives an overview about the meaning of the Req
column.
Req | Meaning |
---|---|
M | Mandatory: Field must be present in the message |
O | Optional: Field can be present in the message |
C | Conditional: Field must be present under certain conditions, see individual descriptions for details |
M* | Mandatory inside group entry: Field must be present if a (repeating) group entry is specified but the group entry as a whole is not mandatory |
Subsequent header tags must exist in every message.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
8 | BeginString | String | M | FIX.4.4 (must be the first field) |
9 | BodyLength | int | M | Message length in bytes up to the CheckSum field (must be the second field) |
35 | MsgType | String | M | Defines the message type (must be the third field) |
34 | MsgSeqNum | int | M | Messages integer sequence number |
49 | SenderCompID | String | M | Client API Key for messages sent from the client, otherwise BSDEX |
52 | SendingTime | UTCTimestamp with microseconds | M | Set to the UTC time when this message was sent, format based on Fix UTCTimestamp , but extended with microsecond resolution YYYYMMDD-HH:MM:SS.ssssss |
56 | TargetCompID | String | M | BSDEX for messages sent from the client, otherwise the Client API Key |
SessionMessageReject (3)
and BusinessMessageReject (j)
are two message types used for error handling and rejection
of messages. When a reject message is sent, it provides details about the rejection reason, allowing the receiver
to diagnose and address the session-level issue and/or application-level issue.
The Session Message Reject (3)
should be issued when a message is received but cannot be properly processed due to a
session-level rule violation.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
372 | RefMsgType | String | M | MsgType (35) of the rejected message |
373 | SessionRejectReason | int | O | Error code to identify the reason for session message rejection |
58 | Text | String | O | Error message explaining the reason for session message rejection |
45 | RefSeqNum | int | O | MsgSeqNum(34) of the rejected message |
The Business Message Reject (j)
message can reject an application-level message which fulfills session level rules
and can't be rejected via any other means. Note if the message fails a session-level, a session-level reject messages
should be issued.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
372 | RefMsgType | String | M | MsgType (35) of the rejected message |
380 | BusinessRejectReason | int | M | Error code to identify the reason for business message rejection |
58 | Text | String | O | Error message explaining the reason for business message rejection |
45 | RefSeqNum | int | O | MsgSeqNum(34) of the rejected message |
The Logon message is used by clients to authenticate after the TCP/TLS session has been established. It must be sent and processed successfully before any business related messages can be sent or received.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | A |
98 | EncryptMethod | int | M | 0 |
108 | HeartBtInt | int | M | Heartbeat interval in seconds, e.g. 30 (recommended) |
141 | ResetSeqNumFlag | Boolean | M | Y if sequence numbers shall be reset for both sides, otherwise N |
96 | RawData | data | M | Message signature, see below for details |
The authentication mechanism works similar as described in Basic information
, section Authentication
. A base64
encoded HMAC signature needs to be generated by the client. When using the fix API this signature is transferred in
field RawData(96)
.
The signature is composed as follows:
hmac username="BSDEX_API_KEY", algorithm="hmac-sha1", headers="date", signature="SIGNATURE"
BSDEX_API_KEY
needs to be replaced by the clients API key and SIGNATURE
needs to be generated as follows:
date: DATE
where DATE
is the current date as specified in standard header field
SendingTime(56)
but using RFC7231 format, such as Tue, 07 Jul 2020 14:16:19 UTC
The completed signature must be written to field RawData(96)
. Please make sure that the standard header fields
SendingTime(52)
and SenderCompID(49)
are set. SendingTime(52)
must use the same timestamp as used for generating
the HMAC (but the format in the header field uses the standard FIX UTC timestamp format).
For a bash script example on how to generate a valid signature, see Basic information
, section Authentication
.
The Test Request (1) message forces a heartbeat from the opposing application. The Test Request (1) message checks sequence numbers or verifies communication line status. The opposite application responds to the Test Request (1) with a Heartbeat (0) containing the TestReqID (112).
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | 1 |
112 | TestReqID | String | M | Unique identifier used to track the response to a Test Request (1). |
The Resend Request (2) is sent by the receiving application to initiate the retransmission of messages. This function is utilized if a sequence number gap is detected, if the receiving application lost a message, or as a function of the initialization process.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | 2 |
7 | BeginSeqNo | int | M | Message sequence number of first message in range to be resent. |
16 | EndSeqNo | int | M | Message sequence number of last message in range to be resent. If request is for a single message BeginSeqNo (7) = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = 0 (representing infinity). |
The Sequence Reset (4) message has two modes: Gap Fill mode and Reset mode.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | 4 |
123 | GapFillFlag | Boolean | O | Gap Fill mode is indicated by GapFillFlag (123) field = 'Y' and Reset mode is indicated by the GapFillFlag (123) field = 'N' or if the field is omitted |
36 | NewSeqNo | int | M | New sequence number. |
The New Order Single message can be used by clients to submit a new order to the exchange. The client needs to have enough funds to place the order.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | D |
11 | ClOrdID | String | M | Client order ID, no more than 64 alphanumerical chars, including dash and underscore |
40 | OrdType | char | M | The type of order to create, 1 (Market), 2 (Limit), 3 (Stop), 4 (Stop limit) are supported |
54 | Side | char | M | The side to place the order, 1 (Buy) and 2 (Sell) are supported |
55 | Symbol | String | M | Name of the BSDEX market to place the order on, e.g. btc-eur , eth-eur etc. |
38 | OrderQty | Qty | C | Decimal quantity specifying the Crypto quantity to buy or sell, see next table for presence requirements |
152 | CashOrderQty | Qty | C | Decimal Euro quantity to use for buying Cryptos via market orders, no more than two decimal places, see next table for presence requirements |
44 | Price | Price | C | Decimal price to bid or ask for in Euro per whole Crypto quantity, no more than two fractional digits, see next table for presence requirements |
99 | StopPx | Price | C | Decimal price for triggering Stop and Stop limit orders in Euro, no more than two fractional digits, see next table for presence requirements |
Depending on the order type and side, some conditional fields are required while others are not. Please see the table below for an overview which conditional fields must be set. Note that other conditional fields must be omitted.
OrdType | Side | Required conditional fields |
---|---|---|
Market (1) | Buy (1) | CashOrderQty |
Market (1) | Sell (2) | OrderQty |
Limit (2) | Buy (1) | OrderQty, Price |
Limit (2) | Sell (2) | OrderQty, Price |
Stop (3) | Buy (1) | CashOrderQty, StopPx |
Stop (3) | Sell (2) | OrderQty, StopPx |
Stop limit (4) | Buy (1) | OrderQty, Price, StopPx |
Stop limit (4) | Sell (2) | OrderQty, Price, StopPx |
If the message cannot be processed a Business Message Reject (j)
will be sent to the client. This can happen due to
insufficient funds, missing fields or other reasons. In case of successful order creation, the client will receive
an Execution Report (8)
containing the provided client order ID and status new.
Order Cancel can be sent by clients to cancel a single order that has not been completely filled yet. Note that one of both IDs must be specified. Either the OrigClOrdID as specified by the client during order creation or the OrderID that was assigned by the exchange. If both are present, OrigClOrdID will take precedence and OrderID may be ignored.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | F |
11 | ClOrdID | String | M | Unique identifier assigned by institution to identify the cancel request |
41 | OrigClOrdID | String | C | ClOrdID of the order to be cancelled (as specified by the client), needed if OrderID is not specified |
37 | OrderID | String | C | OrderID of the order to be cancelled (as specified by the exchange), needed if OrigClOrdID is not specified |
55 | Symbol | String | M | Name of the BSDEX market where the order is present, e.g. btc-eur , eth-eur etc. |
In case of successful order cancellation, the client will receive an Execution Report (8)
containing the provided client order ID and status canceled.
If the order cancellation fails, an Order Cancel Reject (9)
message will be issued. This could occur if the order is unknown or due to other factors.
The Order Cancel Reject (9)
message is sent when an Order Cancel Request is unsuccessful.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | 9 |
37 | ClOrdID | String | M | Unique identifier assigned by institution to identify the cancel request |
41 | OrigClOrdID | String | M | ClOrdID of the previously accepted order (referring to orders that were electronically submitted over FIX or otherwise assigned a ClOrdID) |
37 | OrderID | String | M | OrderID of the order to be cancelled. If CxlRejReason = 0 , will be specified NONE |
39 | OrdStatus | char | M | OrdStatus value after this cancel reject is applied. If CxlRejReason = 0 , will be specified OrdStatus_REJECTED. |
434 | CxlRejResponseTo | char | M | Identifies the type of request that a Cancel Reject is in response to. 1 for Order Cancel Request |
102 | CxlRejReason | char | O | Identifies common reasons why cancel request is rejected. 0 for CxlRejReason_UNKNOWN_ORDER, 2 for CxlRejReason_BROKER, 99 CxlRejReason_OTHER |
58 | Text | String | O | Error message explaining the reason for Order Cancel Request rejection |
Order Mass Cancel Request can be sent by clients to cancel a single market orders or cancel all orders from all markets.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | q (lowercase Q) |
11 | ClOrdID | String | M | Unique ID of Order Mass Cancel Request as assigned by the institution |
530 | MassCancelRequestType | char | M | 1 for market wise orders cancellation, 7 for cancel all orders |
55 | Symbol | String | C | Required for MassCancelRequestType =1 |
The OrderMassCancelReport (r)
is used to acknowledge an Order Mass Cancel Request.
Note that each affected order that is canceled is acknowledged with a separate Execution Report (8)
.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | r (lowercase R) |
11 | OrderID | String | M | Unique Identifier for the Order Mass Cancel Request assigned by the recipient of the Order Mass Cancel Request. |
530 | MassCancelRequestType | char | M | 1 for market wise orders cancellation, 7 for cancel all orders |
531 | MassCancelResponse | char | M | 0 for mass cancel request rejected, 1 for market wise orders cancellation, 7 for cancel all orders |
532 | MassCancelRejectReason | char | C | Indicates why Order Mass Cancel Request was rejected. Required if MassCancelResponse = 0 |
58 | Text | String | O | Error message explaining the reason for Order Mass Cancel Request rejection |
The Bulk Order request is a custom message that is specified by MsgType U1
and not defined by the Fix standard.
It allows clients to cancel and create up to 10 orders each with a single message. Note that the client needs to have
enough funds to have new orders funded momentarily even before canceled orders are taken into account.
If new orders are specified, the conditional fields to specify depend on the order type and side. Please see
message New Order Single (D)
for details about conditional new order fields. The requirements are the same here.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | U1 |
55 | Symbol | String | M | Name of the BSDEX market, e.g. btc-eur , eth-eur etc. |
6001 | NumNewOrders | int | O | Number of repeating new order group entries that follow, min value is 0 and max value is 10 |
11 | ClOrdID | String | M* | Client order ID, no more than 64 alphanumerical chars, including dash and underscore |
40 | OrdType | char | M* | The type of order to create, 1 (Market), 2 (Limit), 3 (Stop), 4 (Stop limit) are supported |
54 | Side | char | M* | The side to place the order, 1 (Buy) and 2 (Sell) are supported |
55 | Symbol | String | M* | Must match the Symbol specified at the top level field 55 |
38 | OrderQty | Qty | C | Decimal quantity specifying the Crypto quantity to buy or sell, see next table for presence requirements |
152 | CashOrderQty | Qty | C | Decimal Euro quantity to use for buying Cryptos via market orders, no more than two decimal places, see next table for presence requirements |
44 | Price | Price | C | Decimal price to bid or ask for in Euro per whole Crypto quantity, no more than two fractional digits, see next table for presence requirements |
99 | StopPx | Price | C | Decimal price for triggering Stop and Stop limit orders, no more than two fractional digits, see next table for presence requirements |
11 | ClOrdID | String | M* | Client order ID, no more than 64 alphanumerical chars, including dash and underscore |
6002 | NumCancelOrdID | int | O | Number of repeating cancel by OrdID group entries that follow, min value is 0 and max value is 10 |
37 | OrderID | String | M* | OrderID of the order to be cancelled (as specified by the exchange) |
6003 | NumCancelOrigClOrdID | int | O | Number of repeating cancel by ClOrdID group entries that follow, min value is 0 and max value is 10 |
41 | OrigClOrdID | String | M* | ClOrdID of the order to be cancelled (as specified by the client) |
If the message cannot be processed a Business Message Reject (j)
will be sent to the client. This can happen due to
insufficient funds, missing fields or other reasons. In case of successful order creation / cancellation, the client will
receive an Execution Report (8)
for each created and cancelled order containing the related (client) order ID and
status new or canceled.
Order Status Request can be sent by clients to retrieve the current state of an order. Note that one of both IDs must be specified. Either the OrigClOrdID as specified by the client during order creation or the OrderID that was assigned by the exchange.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | H |
55 | Symbol | String | M | Name of the BSDEX market where the order is present, e.g. btc-eur , eth-eur etc. |
11 | ClOrdID | String | C | ClOrdID of the order to be queried (as specified by the client), needed if OrderID is not specified |
37 | OrderID | String | C | OrderID of the order to be queried (as specified by the exchange), needed if ClOrdID is not specified |
790 | OrdStatusReqID | String | O | Can be provided to identify a specific status request, will be echoed back in the resulting Execution Report (8) if provided |
If the message cannot be processed a Business Message Reject (j)
will be sent to the client. This can happen due to
unknown orders or other reasons. In case of success the client will receive an Execution Report (8)
with the specified
(client) order ID, order status request ID (if specified) and ExecType (150)
I
(OrderStatus).
Execution Report messages are sent to the client when the status of created orders changes, e.g. for newly created, rejected, cancelled or filled orders. Moreover, an Execution Report will be sent when a Status Request from the client has been received.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | 8 |
37 | OrdID | String | M | ID of the order (as specified by the exchange on order creation) |
11 | ClOrdID | String | M | Client order ID as specified by the client on order creation or cancelation if sent in response to an Order Cancel (F) or Order Mass Cancel (Q) request |
41 | OrigClOrdID | String | C | Client order ID as specified by the client on order creation, set for reports sent in response to an Order Cancel (F) or Order Mass Cancel (Q) request only |
790 | OrdStatusReqID | String | C | Contains the optionally provided OrdStatusReqID (790) if sent in response to an Order Status Request (H) carrying this field |
17 | ExecID | String | M | ID of the execution report if initiated by the server side. Will be 0 if sent in response to a client request, i.e. if ExecType (150) is I (OrderStatus) . |
39 | OrdStatus | char | M | 0 (New), 1 (PartiallyFilled), 2 (Filled), 4 (Cancelled), 8 (Rejected) |
150 | ExecType | char | M | 0 (New), F (Trade), 4 (Cancelled), 8 (Rejected), I (OrderStatus) |
54 | Side | char | M | Side of the order, 1 (Buy) or 2 (Sell) |
55 | Symbol | String | M | Name of the BSDEX market where the order is present, e.g. btc-eur , eth-eur etc. |
151 | LeavesQty | Qty | M | Unfilled decimal quantity, for buy side market orders this value will be given in Euro, otherwise in Cryptocurrency |
14 | CumQty | Qty | M | Filled decimal quantity, for buy side market orders this value will be given in Euro, otherwise in Cryptocurrency |
6 | AvgPx | Price | O | 0 (currently not supported) |
40 | OrdType | char | M | Type of the order, 1 (Market), 2 (Limit), 3 (Stop), 4 (Stop limit) |
44 | Price | Price | C | Decimal price in Euro per whole Crypto quantity as specified on order creation, set for Limit and Stop limit orders only |
99 | StopPx | Price | C | Decimal price for triggering Stop and Stop limit orders in Euro as specified on order creation, set for Stop and Stop limit orders only |
38 | OrderQty | Qty | C | Decimal quantity specifying the Crypto quantity to buy or sell as specified on order creation, set for Limit, Stop limit and sell side Market / Stop orders only |
152 | CashOrderQty | Qty | C | Decimal Euro amount for buying Cryptos via market orders as specified on order creation, set for buy side Market and Stop orders only |
31 | LastPx | Price | C | Decimal price in Euro per whole Crypto quantity for the most recent fill, set if ExecType is F (Trade) only |
32 | LastQty | Qty | C | Decimal quantity specifying the Crypto quantity that was traded in the most recent fill, set if ExecType is F (Trade) only |
Market Data Request can be sent by clients who wish to subscribe to orderbook state and trades. A repeating symbol group
is used to specify one or more markets to subscribe to when setting SubscriptionRequestType (263)
1
. There can only be
one subscription per client at a time. A new subscription will replace the previous one. If markets shall be added or
removed from the current subscription, clients can simply send a new Market Data Request specifying the updated complete
list of wanted markets (symbols). It is recommended to unsubscribe market data with SubscriptionRequestType (263)
2
when it is no longer needed. This will stop market data subscription for all markets.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | V |
262 | MDReqID | String | M | Client identifier for the request, will be included in response messages, unsubscribe should state the same id as specified upon subscribe |
263 | SubscriptionRequestType | char | M | 1 for subscribe, 2 for unsubscribe |
146 | NoRelatedSym | int | O | Number of repeating instrument group entries (symbols) that follow, can be omitted if all BSDEX markets shall be subscribed, not relevant for unsubscribe requests |
55 | Symbol | String | M* | Name of a specific BSDEX market to subscribe, e.g. btc-eur , eth-eur etc., not relevant for unsubscribe requests |
If the message cannot be processed a Market Data Request Reject (Y)
will be sent to the client. In case of success the
client will receive a Market Data Snapshot / Full Refresh (W)
message per subscribed market (symbol) providing an initial
orderbook snapshot. Afterwards, Market Data Incremental Refresh (X)
messages will be sent to communicate orderbook
changes and trades.
Market Data Request Reject will be sent to the client if a Market Data Request (V)
cannot be processed correctly.
A description of the specific error can be found in the Text (58)
field.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | Y |
262 | MDReqID | String | M | Client identifier specified in the market data request that is rejected with this message |
58 | Text | String | O | Error message explaining the reason for message rejection |
Market Data Snapshot / Full Refresh will be sent to the client once per requested market (symbol) after successful subscription.
Each message contains a complete orderbook for a specific market. After the initial snapshot, clients will usually
receive Market Data Incremental Refresh (X)
messages. However, additional snapshot messages may occur occasionally
due to exchange internal processes. Clients must be able to handle this and treat new snapshots as a new starting point
for incorporating following Market Data Incremental Refresh (X)
messages. The orderbook is aggregated. Therefore, each
price level may consist of multiple orders.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | W |
262 | MDReqID | String | M | Client identifier specified in the most recent market data request |
55 | Symbol | String | M | Name of the BSDEX market where the communicated orderbook is present |
263 | NoMDEntries | int | M | Number of aggregated orderbook entries following |
269 | MDEntryType | char | M | 0 for bid side orderbook levels, 1 for offer side orderbook levels |
270 | MDEntryPx | Price | M | Price of the orderbook level |
271 | MDEntrySize | Qty | M | Aggregated quantity of the orderbook level |
346 | NumberOfOrders | int | C | Aggregated order count of the orderbook level, set for MDEntryType 0 (bid) and 1 (offer) only, otherwise absent |
Market Data Incremental Refresh will be sent to subscribed clients for communicating orderbook changes or trades after
the initial Market Data Snapshot / Full Refresh (W)
. A Market Data Incremental Refresh message will contain
either aggregated orderbook levels or trades, not both. While multiple entries are possible and to be expected, a single
message will reference a single market (symbol) only. Note that MDUpdateAction (279)
is always 0
(new) for trades and
always 1
(change) for orderbook levels. New orderbook levels can be identified by new MDEntryPx (270)
values while
removed orderbook levels will state MDEntrySize (271)
0
.
Tag | Name | Type | Req | Description |
---|---|---|---|---|
35 | MsgType | String | M | X |
262 | MDReqID | String | M | Client identifier specified in the most recent market data request |
263 | NoMDEntries | int | M | Number of orderbook levels or trades that follow |
279 | MDUpdateAction | char | M | 0 for trades, 1 for orderbook levels (even for new and deleted orderbook levels) |
55 | Symbol | String | M | Name of the BSDEX market where the orderbook change or trade occurred |
269 | MDEntryType | char | M | 0 for bid side orderbook levels, 1 for offer side orderbook levels, 2 for trades |
270 | MDEntryPx | Price | M | Price of the orderbook level or trade |
271 | MDEntrySize | Qty | M | Quantity of the aggregated orderbook level or trade, for orderbook levels a quantity of 0 indicates removal, e.g. due to cancellation or filling |
346 | NumberOfOrders | int | C | Aggregated order count of the orderbook level, set for MDEntryType 0 (bid) and 1 (offer) only, otherwise absent |
278 | MDEntryID | String | C | Trade ID, set for MDEntryType 2 (trade) only, otherwise absent |
272 | MDEntryDate | UTCDateOnly | C | Trade execution date, set for MDEntryType 2 (trade) only, otherwise absent, standard Fix format YYYYMMDD in UTC |
273 | MDEntryTime | UTCTimeOnly with microseconds | C | Trade execution time, set for MDEntryType 2 (trade) only, otherwise absent, Fix format extended with microsecond resolution HH:MM:SS.ssssss in UTC |
Returns the market's current auction or the current quote
market required | string Example: btc-eur Market name in base-quote form |
{- "buy_price": "string",
- "buy_volume": "string",
- "market": "string",
- "sell_price": "string",
- "sell_volume": "string"
}
Returns the market's information
market required | string Example: btc-eur Market name in base-quote form |
{- "name": "btc-eur",
- "name_required": false,
- "base": {
- "id": "btc",
- "name": "Bitcoin",
- "basic_symbol": "₿",
- "basic_code": "btc",
- "unit_name": "Satoshi",
- "unit_multiplier": 100000000,
- "trading_unit_name": "",
- "dti": "4H95J0R2X",
- "TradingUnitMultiplier": 100000000,
- "TradingToFundsMultiplier": 1
}, - "quote": {
- "id": "eur",
- "name": "Euro",
- "basic_symbol": "€",
- "basic_code": "eur",
- "unit_name": "Cent",
- "unit_multiplier": 100,
- "trading_unit_name": "",
- "TradingUnitMultiplier": 100,
- "TradingToFundsMultiplier": 1
}, - "tick_size": 1
}
Returns a market's phase history
from_ts | integer <int64> Unix time in seconds from when to return phases |
to_ts | integer <int64> Unix time in seconds untill when to return phases |
[- {
- "end_ts": 0,
- "market": "string",
- "name": "string",
- "start_ts": 0
}
]
Returns the market's current quote
market required | string Example: btc-eur Market name in base-quote form |
{- "buy_price": "string",
- "buy_volume": "string",
- "market": "string",
- "sell_price": "string",
- "sell_volume": "string"
}
[- {
- "id": "btc-eur",
- "url": "btc-eur/",
- "base": {
- "id": "btc",
- "name": "Bitcoin",
- "basic_symbol": "₿",
- "basic_code": "btc",
- "unit_name": "Satoshi",
- "unit_multiplier": 100000000,
- "dti": "4H95J0R2X"
}, - "base_trading_multiplier": 100000000,
- "quote": {
- "id": "eur",
- "name": "Euro",
- "basic_symbol": "€",
- "basic_code": "eur",
- "unit_name": "Cent",
- "unit_multiplier": 100
}, - "tick_size": 1,
- "fee": {
- "standard": {
- "aggressive": {
- "type": "percent",
- "value": "0.35"
}, - "passive": {
- "type": "percent",
- "value": "0.2"
}, - "minimum": {
- "type": "absolute",
- "value": "0.01"
}, - "maximum": {
- "type": "absolute",
- "value": "999999999"
}
}
}, - "price_scale": 2
}, - {
- "id": "eth-eur",
- "url": "eth-eur/",
- "base": {
- "id": "eth",
- "name": "Ethereum",
- "basic_symbol": "Ξ",
- "basic_code": "eth",
- "unit_name": "Wei",
- "unit_multiplier": 1000000000000000000,
- "dti": "X9J9K872S"
}, - "base_trading_multiplier": 1000000000,
- "quote": {
- "id": "eur",
- "name": "Euro",
- "basic_symbol": "€",
- "basic_code": "eur",
- "unit_name": "Cent",
- "unit_multiplier": 100
}, - "tick_size": 1,
- "fee": {
- "standard": {
- "aggressive": {
- "type": "percent",
- "value": "0.35"
}, - "passive": {
- "type": "percent",
- "value": "0.2"
}, - "minimum": {
- "type": "absolute",
- "value": "0.01"
}, - "maximum": {
- "type": "absolute",
- "value": "999999999"
}
}
}, - "price_scale": 2
}
]
{- "fees": {
- "1": {
- "fee_id": 1,
- "aggressive": {
- "type": "percent",
- "value": "0.35"
}, - "passive": {
- "type": "percent",
- "value": "0.2"
}, - "minimum": {
- "type": "absolute",
- "value": "0.01"
}, - "maximum": {
- "type": "absolute",
- "value": "9223372036854775807"
}, - "minvol": 0,
- "maxvol": 9223372036854776000,
- "role": "retail",
- "name": "",
- "valid_from": "2021-05-01",
- "valid_to": "2021-06-06"
}, - "4": {
- "fee_id": 4,
- "aggressive": {
- "type": "percent",
- "value": "0.5"
}, - "passive": {
- "type": "percent",
- "value": "0.5"
}, - "minimum": {
- "type": "absolute",
- "value": "0.01"
}, - "maximum": {
- "type": "absolute",
- "value": "9223372036854775807"
}, - "minvol": 0,
- "maxvol": 25000,
- "role": "retail",
- "name": "",
- "valid_from": "2021-06-07",
- "valid_to": "9999-12-31"
}, - "5": {
- "fee_id": 5,
- "aggressive": {
- "type": "percent",
- "value": "0.35"
}, - "passive": {
- "type": "percent",
- "value": "0.2"
}, - "minimum": {
- "type": "absolute",
- "value": "0.01"
}, - "maximum": {
- "type": "absolute",
- "value": "9223372036854775807"
}, - "minvol": 25000,
- "maxvol": 9223372036854776000,
- "role": "retail",
- "name": "",
- "valid_from": "2021-06-07",
- "valid_to": "9999-12-31"
}
}, - "user_fees": {
- "btc-eur": 5,
- "eth-eur": 4,
- "xrp-eur": 4
}, - "volume_last_period": 4,
- "volume_current_period": 0,
- "valid_from": "2022-09-13"
}
Returns a list with the users orders. Entries are sorted descending by created_at timestamp meaning that most recent orders will be listed first.
market required | string Example: btc-eur Market name in base-quote form |
before | string <date-time> Date and time to use as offset when fetching orders. Only orders with timestamp created_at before that date and time are returned. Format is defined by RFC 3339, section 5.6 and can have nanosecond precision, for example 2022-11-03T18:39:14.592033123Z |
client_order_id | string Client order ID to filter for |
cursor | string Cursor pointing at the next page to fetch. A response will contain header NEXT-CURSOR if there are more entries available. In order to fetch the next page, set cursor to the value of NEXT-CURSOR from the recent responses header. Note that other query parameters for filtering will be ignored if cursor is set (limit can be used though). |
limit | integer [ 1 .. 1000 ] Default: 1000 Maximum number of entries to return in a single response. Values must not be below 1 or above 1000. |
order_id | string Order ID to filter for |
order_status | string Enum: "open" "closed" "cancelled" "rejected" "new" Order status to filter for |
[- {
- "id": "d2cc7ca7-7802-489d-a8d9-ed4a2541bc42",
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": 0.231,
- "quote_quantity": 100.53,
- "price": 3140.37,
- "stop_price": 2151.12,
- "triggered_price": 2151.12,
- "type": "limit",
- "filled": 0.17,
- "quote_filled": 90.83,
- "order_status": "open",
- "fill_status": "partially_filled",
- "created_at": 1667556123135812400,
- "cancelled_at": 1667556260799030000,
- "triggered_at": 1667556133959046100,
- "fee": 0.3,
- "market": "btc-eur",
- "triggered_reason": "highest_buy",
- "cancelled_reason": "cancelled_by_user",
- "executed_value": 324.78,
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
]
Creates a new order.
market required | string Example: btc-eur Market name in base-quote form |
risk_disclaimer_confirmed | boolean Default: false Risk disclaimer confirmation required for non-regulated businesses. These types of businesses must confirm that orders are created under risk management conditions. Otherwise, the request will be rejected. Different types of users can omit this parameter as it is not required for them. |
client_id | string Optional ID that can be specified, e.g. for filtering orders at a later point. Only alphanumerical characters, dash and underscore are allowed. Maximum length is 64 characters. |
end_user_id | string Identifier for an end user if this order is created on behalf of someone else. It has to be set by businesses that create orders for their customers. Other user types must not set it. |
market | string Specifies the market to create an order for. |
price | string Decimal number string specifying the price to bid or ask for in Euro per whole Crypto quantity. Must be present if type is limit. Irrelevant if type is market. No more than two fractional digits are allowed (whole cents). Must be greater than zero. |
quantity | string Decimal number string specifying the Crypto quantity to buy or sell. Must be present if type is limit (any side) or type is market and side is sell. Must not be present if type is market and side is buy. |
quote_quantity | string Decimal number string specifying the Euro quantity to use for buying Cryptos via market orders. Must be present if type is market and side is buy. Must not be present if type is limit (any side) or type is market and side is sell. No more than two fractional digits are allowed (whole cents). |
side required | string Enum: "buy" "sell" Specifies whether a buy or sell order shall be created. |
stop_price | string Decimal number string specifying an optional price for triggering a stop order if desired. No more than two fractional digits are allowed (whole cents). Must be greater than zero. |
type required | string Enum: "limit" "market" Specifies whether a limit or market order shall be created. |
{- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": "0.135",
- "price": "100.99",
- "type": "limit",
- "market": "btc-eur"
}
{- "id": "d2cc7ca7-7802-489d-a8d9-ed4a2541bc42",
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": 0.231,
- "quote_quantity": 100.53,
- "price": 3140.37,
- "stop_price": 2151.12,
- "triggered_price": 2151.12,
- "type": "limit",
- "filled": 0.17,
- "quote_filled": 90.83,
- "order_status": "open",
- "fill_status": "partially_filled",
- "created_at": 1667556123135812400,
- "cancelled_at": 1667556260799030000,
- "triggered_at": 1667556133959046100,
- "fee": 0.3,
- "market": "btc-eur",
- "triggered_reason": "highest_buy",
- "cancelled_reason": "cancelled_by_user",
- "executed_value": 324.78,
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
Creates a set of new orders and / or cancellations. This allows bundling multiple order operations that would otherwise need individual requests. Nevertheless, the number of orders for cancellation and insert should be kept to a reasonable size. Otherwise, the request may get rejected. It is recommended to use no more than 10 entries for each cancel and insert array.
market required | string Example: btc-eur Market name in base-quote form |
risk_disclaimer_confirmed | boolean Default: false Risk disclaimer confirmation required for non-regulated businesses. These types of businesses must confirm that orders are created under risk management conditions. Otherwise, the request will be rejected. Different types of users can omit this parameter as it is not required for them. |
cancel | Array of strings Optional list of IDs referencing orders that shall be canceled. This parameter is mutually exclusive with parameter cancel_client_ids, only one of them can be used at most. | ||||||||||||||||||
cancel_client_ids | Array of strings Optional list of client IDs referencing orders that shall be canceled. This parameter is mutually exclusive with parameter cancel, only one of them can be used at most. | ||||||||||||||||||
Array of objects (orderRequest) Optional list of new orders to create. | |||||||||||||||||||
Array ()
|
{- "cancel": [
- "d017879a-e91c-45f2-8309-351163e79fe0",
- "7tac47fc-3ff1-4313-9fc9-e23698a4a5e2"
], - "insert": [
- {
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": "0.135",
- "price": "100.99",
- "type": "limit",
- "market": "btc-eur"
}, - {
- "client_id": "abcd-4712",
- "side": "sell",
- "quantity": "2.31",
- "price": "101.50",
- "type": "limit",
- "market": "btc-eur"
}
]
}
[- {
- "id": "d2cc7ca7-7802-489d-a8d9-ed4a2541bc42",
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": 0.231,
- "quote_quantity": 100.53,
- "price": 3140.37,
- "stop_price": 2151.12,
- "triggered_price": 2151.12,
- "type": "limit",
- "filled": 0.17,
- "quote_filled": 90.83,
- "order_status": "open",
- "fill_status": "partially_filled",
- "created_at": 1667556123135812400,
- "cancelled_at": 1667556260799030000,
- "triggered_at": 1667556133959046100,
- "fee": 0.3,
- "market": "btc-eur",
- "triggered_reason": "highest_buy",
- "cancelled_reason": "cancelled_by_user",
- "executed_value": 324.78,
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
]
Cancels a list of orders either by client ID or normal ID. Note that only one of both ID types can be used. client_id will take preference if entries for both arrays are provided.
market required | string Example: btc-eur Market name in base-quote form |
client_id | Array of strings List of client IDs referencing orders that shall be canceled. Should not be used in combination with parameter id as only one of both ID types can be used. client_id will take preference if both are provided. |
id | Array of strings List of normal IDs referencing orders that shall be canceled. Should not be used in combination with parameter client_id as only one of both ID types can be used. client_id will take preference if both are provided. |
{- "id": [
- "d017879a-e91c-45f2-8309-351163e79fe0",
- "7tac47fc-3ff1-4313-9fc9-e23698a4a5e2"
]
}
[- {
- "id": "d2cc7ca7-7802-489d-a8d9-ed4a2541bc42",
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": 0.231,
- "quote_quantity": 100.53,
- "price": 3140.37,
- "stop_price": 2151.12,
- "triggered_price": 2151.12,
- "type": "limit",
- "filled": 0.17,
- "quote_filled": 90.83,
- "order_status": "open",
- "fill_status": "partially_filled",
- "created_at": 1667556123135812400,
- "cancelled_at": 1667556260799030000,
- "triggered_at": 1667556133959046100,
- "fee": 0.3,
- "market": "btc-eur",
- "triggered_reason": "highest_buy",
- "cancelled_reason": "cancelled_by_user",
- "executed_value": 324.78,
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
]
[- {
- "id": "d2cc7ca7-7802-489d-a8d9-ed4a2541bc42",
- "client_id": "abcd-4711",
- "side": "buy",
- "quantity": 0.231,
- "quote_quantity": 100.53,
- "price": 3140.37,
- "stop_price": 2151.12,
- "triggered_price": 2151.12,
- "type": "limit",
- "filled": 0.17,
- "quote_filled": 90.83,
- "order_status": "open",
- "fill_status": "partially_filled",
- "created_at": 1667556123135812400,
- "cancelled_at": 1667556260799030000,
- "triggered_at": 1667556133959046100,
- "fee": 0.3,
- "market": "btc-eur",
- "triggered_reason": "highest_buy",
- "cancelled_reason": "cancelled_by_user",
- "executed_value": 324.78,
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
]
Returns a list of public trades for this market
market required | string Example: btc-eur Market name in base-quote form |
limit | integer Number of results to be returned by the API. Must be used with 'offset'. Maximum value is 1000. |
offset | integer Offset from which the API will start returning results. Must be used with 'limit'. |
order_id | string Order ID to filter for. |
[- {
- "id": "98a831b0-b48a-4444-b926-fa0cec5a8974",
- "executed_at": "2021-03-22T06:05:43.567786Z",
- "local_ts": 1616393143567786800,
- "quantity": "0.01",
- "price": "48677.73",
- "market": "btc-eur",
- "published_at": "2021-03-22T06:05:43.901251Z"
}
]
Returns a list of public trades with additional meta information for this market. This is an alternative endpoint to /api/v1/{market}/trades which provides the same trade data and query options but no meta data section. In general, it is recommended to prefer this newer endpoint as it contains more information. However, clients may choose to keep using the normal trades endpoint if they do not need the meta section.
market required | string Example: btc-eur Market name in base-quote form |
limit | integer Number of results to be returned by the API. Must be used with 'offset'. Maximum value is 1000. |
offset | integer Offset from which the API will start returning results. Must be used with 'limit'. |
order_id | string Order ID to filter for. |
{- "data": [
- {
- "id": "98a831b0-b48a-4444-b926-fa0cec5a8974",
- "executed_at": "2021-03-22T06:05:43.567786Z",
- "local_ts": 1616393143567786800,
- "quantity": "0.01",
- "price": "48677.73",
- "market": "btc-eur",
- "published_at": "2021-03-22T06:05:43.901251Z"
}
], - "meta": {
- "dti": "4H95J0R2X",
- "asset_name": "Bitcoin",
- "price_curr": "BTC/EUR",
- "price_nota": "MONE",
- "quantity_nota": "UNIT",
- "venue": "XDEX"
}
}
Returns a list of the account's trades for the market
market required | string Example: btc-eur Market name in base-quote form |
before | integer <int64> Unix time in nanoseconds until when to return trades (exclusive). Will be ignored if 'cursor' parameter is set. |
cursor | string Cursor can be used to fetch the next batch of trades. It's value should be taken from NEXT-CURSOR that will be returned in response headers from the API. Query parameters 'before' and 'order_id' will be ignored if 'cursor' is set. |
order_id | string Order ID to filter for. Will be ignored if 'cursor' parameter is set. |
[- {
- "client_order_id": "string",
- "fee": "string",
- "id": "string",
- "local_ts": 0,
- "market": "string",
- "order_id": "string",
- "price": "string",
- "quantity": "string",
- "side": "string",
- "end_user_id": "bc07ba97-145e-4dcb-926a-16d8e2297f9c"
}
]
Returns the market's TradingView config
market required | string Example: btc-eur Market name in base-quote form |
{- "errors": [
- {
- "id": "string",
- "code": "string",
- "status": 0,
- "detail": "string",
- "source": {
- "field": "string",
- "message": "string"
}
}
]
}
Returns TradingView history
market required | string Example: btc-eur Market name in base-quote form |
{- "errors": [
- {
- "id": "string",
- "code": "string",
- "status": 0,
- "detail": "string",
- "source": {
- "field": "string",
- "message": "string"
}
}
]
}
Returns list of TradingView symbols
market required | string Example: btc-eur Market name in base-quote form |
{- "errors": [
- {
- "id": "string",
- "code": "string",
- "status": 0,
- "detail": "string",
- "source": {
- "field": "string",
- "message": "string"
}
}
]
}
Returns TradingView time
market required | string Example: btc-eur Market name in base-quote form |
{- "errors": [
- {
- "id": "string",
- "code": "string",
- "status": 0,
- "detail": "string",
- "source": {
- "field": "string",
- "message": "string"
}
}
]
}
Get a user's crypto wallet address for a given asset_id
asset_id required | string Enum: "btc" "eth" "ltc" "xrp" |
X-Request-Id | string |
{- "data": {
- "address": "2N7NMGkUnwoyaH75YSMGVNug5tmmpM2NiJf",
- "created_at": "2020-08-05T17:50:48.969Z",
- "is_used": false,
- "tag": null
}
}
Create a new crypto wallet address for a given asset_id
X-Request-Id | string |
asset_id required | string Enum: "btc" "eth" "ltc" "xrp" one of: ["btc", "eth", "ltc", "xrp"] |
{- "asset_id": "eth"
}
{- "data": {
- "address": "2N7NMGkUnwoyaH75YSMGVNug5tmmpM2NiJf",
- "created_at": "2020-08-05T17:50:48.969Z",
- "is_used": false,
- "tag": null
}
}
Get a crypto deposit made to a user's wallet
uuid required | string |
X-Request-Id | string |
{- "data": {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:27.057Z",
- "finalized_at": "2020-12-30T14:59:27.056Z",
- "source_address": "188wQrYSDwUfxbSSZCLMpgDBV6qNFBe1Uy",
- "source_tag": null,
- "target_address": "1HHCVrJ8V7borYr2G2mKjDRRNdRx37467f",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "deposit",
- "uuid": "4570051f-a1ed-435a-b48b-6911f98b6036"
}
}
List crypto deposits made to a user's wallet
asset_id required | any Enum: "btc" "eth" "ltc" "xrp" |
created_after | string <date-time> Example: |
page | integer |
X-Request-Id | string |
{- "data": [
- {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:27.076Z",
- "finalized_at": "2020-12-30T14:59:27.076Z",
- "source_address": "1N292b4JeEFoiWryZysVR7wMxYGvptkfc3",
- "source_tag": null,
- "target_address": "1GL8EMwojQwZ1tStbvuTg7QZkSGQkYs1xs",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "deposit",
- "uuid": "e57c2ccb-c8dc-419a-8c64-5cf0a6993ac5"
}, - {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:27.079Z",
- "finalized_at": "2020-12-30T14:59:27.078Z",
- "source_address": "1546c4yJRGqB9gk9ZW7dDyJsFk1csaxEbK",
- "source_tag": null,
- "target_address": "1Fewvzc2RqmXpZak8DjcgdyYFedacHimmE",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "deposit",
- "uuid": "3515beb0-9c85-4f5f-b21c-f8bdd4d2efea"
}, - {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:27.081Z",
- "finalized_at": "2020-12-30T14:59:27.081Z",
- "source_address": "1E891uPsUAFF5shiQT8igY5EmrZCb1NELG",
- "source_tag": null,
- "target_address": "1ECic1bTrmrCoim7hE3mmeQ2Xwc4fFQ6At",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "deposit",
- "uuid": "9c6771cf-116e-41bc-8a9c-6fd6ecfced79"
}
]
}
Get a crypto withdrawal made from a user's wallet
uuid required | string |
X-Request-Id | string |
{- "data": {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.019Z",
- "finalized_at": "2020-12-30T14:59:28.019Z",
- "source_address": "114iT4ymRSdcPUYgQaKdTvxLJV3BKd5vU",
- "source_tag": null,
- "target_address": "1GR7xtD11yDLhvjgx3PErhXN1exKLVLHQ3",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "f94d1348-591a-45c9-910c-017ba008190c"
}
}
List crypto withdrawals made from a user's wallet
asset_id required | any Enum: "btc" "eth" "ltc" "xrp" |
created_after | string <date-time> Example: |
page | integer |
X-Request-Id | string |
{- "data": [
- {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.037Z",
- "finalized_at": "2020-12-30T14:59:28.036Z",
- "source_address": "15XcENunELnquvqfPkHM7nZqgZ5CELrerZ",
- "source_tag": null,
- "target_address": "15kt6eBbhyj5pg74kkeYwEpep5y1Ttr895",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "db72d18a-6693-403d-b25a-cc476cdd6830"
}, - {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.040Z",
- "finalized_at": "2020-12-30T14:59:28.039Z",
- "source_address": "1DHR4Ty8sb3JRihFtgejk26tCQJ6siRwtC",
- "source_tag": null,
- "target_address": "1MrXdbme5jz2k6XBSyuNtea7si7AwPrpih",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "2b491318-ed21-432c-9c9a-766039ad6f96"
}, - {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.042Z",
- "finalized_at": "2020-12-30T14:59:28.042Z",
- "source_address": "1E3FQhwBXZNjDPTYfiThdvzvAae3g16HFf",
- "source_tag": null,
- "target_address": "1QCTLPyDS6PTGCcpLYQHUfmmo6qMQ2ETE4",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "63f4393b-14bc-431e-881e-5dc0dba04519"
}
]
}
Create a new crypto withdrawal from a user's wallet, but do not execute it
X-Request-Id | string |
amount required | number <decimal> amount in decimal |
asset_id required | string Enum: "btc" "eth" "ltc" "xrp" one of: ["btc", "eth", "ltc", "xrp"] |
destination_tag | string optional destination tag for XRP withdrawals |
target_address required | string wallet address to withdraw to |
{- "amount": 0.0612,
- "asset_id": "btc",
- "target_address": "17fnafpkX9fUA5V9FuPzKyX4jmq15dZZw2",
- "destination_tag": null
}
{- "data": {
- "amount": "0.000612",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.073Z",
- "finalized_at": null,
- "source_address": null,
- "source_tag": null,
- "target_address": "13ML1PPWDgNX3c6MiXj6Xhdw3qX86Ka9U9",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "a4e1f6a2-5bf6-42e4-bf51-7143178fc834"
}
}
Execute a crypto withdrawal from the user's wallet
uuid required | string |
X-Request-Id | string |
{- "data": {
- "amount": "0.00004711",
- "asset_id": "btc",
- "created_at": "2020-12-30T14:59:28.095Z",
- "finalized_at": "2020-12-30T14:59:28.095Z",
- "source_address": "1KqNnCN1MixHEngJJoMGxJFTzhTeqSNePz",
- "source_tag": null,
- "target_address": "1NozyxoxWabno6ZAq5KaWMxHk3su67rM1M",
- "destination_tag": null,
- "transaction_state": "created",
- "transaction_type": "withdrawal",
- "uuid": "474b01ca-f3eb-4476-9e25-bb2d0b041d2c"
}
}
Creates a new fiat withdrawal from the user's account, but does not execute it
X-Request-Id | string |
amount required | number <decimal> |
asset_id required | string Value: "EUR" |
target_address required | string |
{- "amount": 0,
- "asset_id": "EUR",
- "target_address": "string"
}
{- "data": {
- "amount": "1500.00",
- "asset_id": "EUR",
- "created_at": "2020-05-08T10:36:03.123Z",
- "finalized_at": "2020-05-08T10:39:15.681Z",
- "source_address": "DE28110101008889546899",
- "target_address": "DE28110101008889546901",
- "transaction_state": "settled",
- "transaction_type": "withdrawal",
- "uuid": "f1c7a528-8b4e-4edf-bb43-24e7b36df352"
}
}
Gets a fiat withdrawal
uuid required | string <uuid> |
X-Request-Id | string |
{- "data": {
- "amount": "1500.00",
- "asset_id": "EUR",
- "created_at": "2020-05-08T10:36:03.123Z",
- "finalized_at": "2020-05-08T10:39:15.681Z",
- "source_address": "DE28110101008889546899",
- "target_address": "DE28110101008889546901",
- "transaction_state": "settled",
- "transaction_type": "withdrawal",
- "uuid": "f1c7a528-8b4e-4edf-bb43-24e7b36df352"
}
}
Executes a fiat withdrawal, idempotent
uuid required | string <uuid> |
X-Request-Id | string |
{- "data": {
- "amount": "1500.00",
- "asset_id": "EUR",
- "created_at": "2020-05-08T10:36:03.123Z",
- "finalized_at": "2020-05-08T10:39:15.681Z",
- "source_address": "DE28110101008889546899",
- "target_address": "DE28110101008889546901",
- "transaction_state": "settled",
- "transaction_type": "withdrawal",
- "uuid": "f1c7a528-8b4e-4edf-bb43-24e7b36df352"
}
}
Gets a fiat deposit
uuid required | string <uuid> |
X-Request-Id | string |
{- "data": {
- "amount": "1500.00",
- "asset_id": "EUR",
- "created_at": "2020-05-08T10:36:03.123Z",
- "finalized_at": "2020-05-08T10:39:15.681Z",
- "source_address": "DE28110101008889546899",
- "target_address": "DE28110101008889546901",
- "transaction_state": "settled",
- "transaction_type": "withdrawal",
- "uuid": "f1c7a528-8b4e-4edf-bb43-24e7b36df352"
}
}