NAV

Introduction

Welcome to the documentation of the LiteBit Exchange API!

Colocation

LiteBit's servers are hosted in Frankfurt (AWS' eu-central-1 region).

Errors

We have divided the errors into 5 code ranges to ease error handling:

code message description
10000 - This error code is used for validation errors. See message for more information about the validation error.
10001 Minimum order amount is <amount> <quote_asset>. The notional value of your order is too low. Use GET /market's minimum_amount_quote to retrieve the market's minimum notional value.
10002 Time in force is only allowed for limit orders. Order time in force is missing.
10003 Post-only is only allowed for limit orders.
10004 Price must be higher than zero. Order price is too low.
10005 Price is required for limit orders. Order price is missing.
10006 Type is required for orders. Order type is missing.
10007 Invalid time window. Time window cannot be smaller than 1 or larger than 60000 milliseconds.
10008 Unauthenticated. Authentication is required to perform the operation.
10009 Unauthorized. The access scope(s) required to perform the operation are missing.
10010 Invalid JSON.
10011 Invalid event.
10012 Invalid channel.
10013 Could not derive authentication method.
Invalid API key and/or signature.
Invalid timestamp.
Invalid API key.
Invalid signature.
Connection is already authenticated.
20000 Insufficient funds.
20001 Maximum of open orders allowed per user per market.
20002 Insufficient liquidity.
20003 Rate limit exceeded.
20004 Error. Transient request error without any available public information.
20005 - Operation could not be performed for legal reasons. See message for more information about the error.
30000 Maintenance mode. Exchange is in maintenance mode.
30001 Internal server error. An unexpected error occurred. The execution status of your request is unknown.
40000 Market in post-only mode. Only post-only orders are currently accepted by the matching engine.
40001 Market in cancel-only mode. Only cancel order requests are currently accepted by the matching engine.
40002 Order book limit reached, only taker orders are allowed.
40003 Market overloaded.
40004 Market is halted.
40005 Market is inactive.
50000 Request received outside the allowed time window. Your request was rejected, because it was received outside the allowed time window.

Rate limits

Requests

LiteBit rate limits requests to its API. Our rate limiters implement the Token Bucket algorithm.

For order creation (POST /order) and order cancellation (DELETE /orders), we enforce a shared rate limit of 10 request/second per user per market. For the other endpoints, we use a weight-based rate limit of 1000/minute per IP address or user. Please inspect each endpoint to see its weight.

On each REST request, there are three headers that return relevant information regarding the applied rate limit:

Header Description
LITEBIT-RATELIMIT-RESET The unix timestamp at which you have enough tokens to do the same request again.
LITEBIT-RATELIMIT-LIMIT The maximum number of tokens in the bucket.
LITEBIT-RATELIMIT-REMAINING The number of tokens left in the bucket.

If you are rate limited, you will receive a 429 response. Repeatedly violating our rate limits may result in an API key or IP address ban.

Open orders

The maximum number of open orders per user per market is 200.

Authentication

The API consists of public and private methods. Public methods do not require authentication. Private methods require API key authentication. You can create API keys via the LiteBit Exchange website.

For more information about how to authenticate on the different gateways, see the REST API authentication and WebSocket authentication sections.

Message signing

# Python code
import hmac, hashlib

# your API keys' secret
secret = 'b5ed73bbf6fc8f5b5f41bbd85b743...'

# replace this value with the data string you would like to sign
message = 'authenticate1631787453519'

# create a sha256 hmac with the secret and sign the message
signature = hmac.new(secret.encode("utf-8"), message.encode("utf-8"), hashlib.sha256)

# hex encode the signature and return
return signature.hexdigest()

A signature can be generated by creating a SHA-256 HMAC hex digest of a certain data string (see code sample on your right). Which data string to sign depends on the gateway: REST API or WebSocket.

Access scopes

The scopes that are associated with an API key determine which methods it is authorized to use. Scopes are required and checked for private methods. Please refer to the documentation below to see which scope is required for a specific endpoint.

Name Description
view Permission to read data related to your account.
trade Permission to add, update, cancel and retrieve orders.
withdraw Permission to withdraw funds.
manage_account Permission to manage your account - allows to create API keys, etc..

REST API

General

The REST API endpoints are divided into 5 categories: supporting, market data, account management, trading and wallet. All endpoints in the account management, trading and wallet category require authentication, click here for more information. The base URL is https://api.exchange.litebit.eu/v1.

Some remarks:

Authentication

A request to a private endpoint must include the following headers:

Header Description
LITEBIT-API-KEY The key of your API key.
LITEBIT-SIGNATURE Signature of LITEBIT-TIMESTAMP + method + url + body (click here for the documentation regarding message signing). Body may be empty (e.g. in case of GET requests), otherwise this is a string representation of the body. See examples below.
LITEBIT-TIMESTAMP The current unix timestamp in milliseconds.

Examples

In case of an API key with secret secret and LITEBIT-TIMESTAMP header equal to 1640086253583:

Errors

{
    "code": 10007,
    "message": "Invalid time window."
}

The following HTTP status codes may be returned in case of an error:

HTTP status code description
400 - Bad Request See response body for more information (example on the right). For more information about the error codes that you may encounter, see this section.
401 - Unauthorized Authentication is required to perform the operation.
403 - Forbidden The access scope(s) required to perform the operation are missing.
404 - Not Found The requested resource does not exist.
429 - Too Many Requests Rate limit exceeded.
5xx - Server Errors An unexpected error occurred. The execution status of your request is unknown.

Timing

The header LITEBIT-WINDOW may be used to specify the number of milliseconds after LITEBIT-TIMESTAMP the request is valid for. If LITEBIT-WINDOW is not sent, it defaults to 5000.

Methods

Supporting

GET /time

curl "https://api.exchange.litebit.eu/v1/time"

The above command returns JSON structured like this:

{
  "timestamp": 1622037056047
}

This endpoint retrieves the current server time.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/time

Response

200 OK

Name Type Description
timestamp integer The current unix timestamp on the server.

Market data

GET /assets

curl "https://api.exchange.litebit.eu/v1/assets"

The above command returns JSON structured like this:

[
    {
        "code": "BTC",
        "name": "Bitcoin",
        "decimals": "8"
    }
]

This endpoint retrieves all assets.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/assets

Response

200 OK

Array of objects.

Name Type Description
code string The code of the asset.
name string The full name of the asset.
decimals string The number of decimal places in which amounts are specified.

GET /asset

curl "https://api.exchange.litebit.eu/v1/asset?code=BTC"

The above command returns JSON structured like this:

{
    "code": "BTC",
    "name": "Bitcoin",
    "decimals": "8"
}

This endpoint retrieves an asset.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/asset

Query Parameters
Parameter Required Type Description
code true string The code of the asset.
Response

200 OK

Name Type Description
code string The code of the asset.
name string The full name of the asset.
decimals string The number of decimal places in which amounts are specified.

GET /markets

curl "https://api.exchange.litebit.eu/v1/markets"

The above command returns JSON structured like this:

[
    {
        "market": "BTC-EUR",
        "status": "active",
        "tick_size": "0.01",
        "step_size": "0.00000001",
        "minimum_amount_quote": "5.00",
        "base_asset": "BTC",
        "quote_asset": "EUR"
    }
]

This endpoint retrieves all markets.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/markets

Response

200 OK

Array of objects.

Name Type Description
market string The symbol of the market.
status string The status of the market. Possible values: active, post_only, cancel_only, inactive, maintenance and halted.
tick_size string The minimum increment in which prices may change.
step_size string The minimum increment in which amounts may change.
minimum_amount_quote string The minimum notional value for valid orders.
base_asset string The code of the base asset.
quote_asset string The code of the quote asset.

GET /market

curl "https://api.exchange.litebit.eu/v1/market?market=BTC-EUR"

The above command returns JSON structured like this:

{
    "market": "BTC-EUR",
    "status": "active",
    "tick_size": "0.01",
    "step_size": "0.00000001",
    "minimum_amount_quote": "5.00",
    "base_asset": "BTC",
    "quote_asset": "EUR"
}

This endpoint retrieves a market.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/market

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
Response

200 OK

Name Type Description
market string The symbol of the market.
status string The status of the market. Possible values: active, post_only, cancel_only, inactive, maintenance and halted.
tick_size string The minimum increment in which prices may change.
step_size string The minimum increment in which amounts may change.
minimum_amount_quote string The minimum notional value for valid orders.
base_asset string The code of the base asset.
quote_asset string The code of the quote asset.

GET /tickers

curl "https://api.exchange.litebit.eu/v1/tickers"

The above command returns JSON structured like this:

[
    {
        "market": "BTC-EUR",
        "open": "0.0235",
        "last": "0.0324",
        "volume": "3774750989.06",
        "low": "0.0176",
        "high": "0.0324",
        "bid": "0.0323",
        "ask": "0.0176"
    }
]

This endpoint retrieves all tickers.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/tickers

Response

200 OK

Array of objects.

Name Type Description
market string The symbol of the market.
open string The price of the first trade during the last 24 hours.
last string The price of the last trade.
volume string The volume during the last 24 hours in base asset.
low string The lowest price of a trade during the last 24 hours.
high string The highest price of a trade during the last 24 hours.
bid string The current best bid price.
ask string The current best ask price.

GET /ticker

curl "https://api.exchange.litebit.eu/v1/ticker?market=BTC-EUR"

The above command returns JSON structured like this:

{
    "market": "BTC-EUR",
    "open": "0.0235",
    "last": "0.0324",
    "volume": "3774750989.06",
    "low": "0.0176",
    "high": "0.0324",
    "bid": "0.0323",
    "ask": "0.0176"
}

This endpoint retrieves a ticker.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/ticker

Response

200 OK

Name Type Description
market string The symbol of the market.
open string The price of the first trade during the last 24 hours.
last string The price of the last trade.
volume string The volume during the last 24 hours in base asset.
low string The lowest price of a trade during the last 24 hours.
high string The highest price of a trade during the last 24 hours.
bid string The current best bid price.
ask string The current best ask price.

GET /book

curl "https://api.exchange.litebit.eu/v1/book?market=BTC-EUR"

The above command returns JSON structured like this:

{
    "market": "BTC-EUR",
    "timestamp": 1622123573863,
    "sequence": 1231232,
    "update_type": "snapshot",
    "bids": [
        ["2.0000", "201.99000000"],
        ...,
    ],
    "asks": [
        ["2.0000", "201.99000000"],
        ...,
    ]
}

This endpoint retrieves the latest book snapshot.

Rate limiting weight: 5

HTTP Request

GET https://api.exchange.litebit.eu/v1/book

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
Response

200 OK

Name Type Description
market string The symbol of the market.
timestamp integer The timestamp of this orderbook state.
sequence integer Sequence number of this orderbook state. Incremented by one for every update of the book.
update_type string The type of update: snapshot.
bids array of [string, string] Array of bids: [price, amount].
asks array of [string, string] Array of asks: [price, amount].

GET /candles

curl "https://api.exchange.litebit.eu/v1/candles?market=BTC-EUR"

The above command returns JSON structured like this:

[
    [
        1623739800000,
        "0.0237",
        "0.0237",
        "0.0237",
        "0.0237",
        "126558.40073552"
    ]
]

This endpoint retrieves the candles.

Rate limiting weight: 5

HTTP Request

GET https://api.exchange.litebit.eu/v1/candles

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
timestamp_from false integer The earliest unix timestamp to return candles for.
timestamp_to false integer The latest unix timestamp to return candles for.
interval false integer The interval of the candles. Possible values: 60, 300, 900, 3600, 14400, 86400.
limit false integer The maximum number of candles to return. Maximum: 500.
Response

200 OK

Array of arrays: [timestamp, open, high, low, close, volume].

Name Type Description
timestamp integer The timestamp of the candle.
open string The price of the first trade during the last 24 hours.
low string The lowest price of a trade during the last 24 hours.
high string The highest price of a trade during the last 24 hours.
close string The price of the last trade.
volume string The volume during the last 24 hours in base asset.

GET /trades

curl "https://api.exchange.litebit.eu/v1/trades?market=BTC-EUR"

The above command returns JSON structured like this:

[
    {
        "uuid": "9beba3ae-4755-4f06-82be-60b2a3452926",
        "amount": "0.41322185",
        "price": "38218.40000000",
        "side": "buy",
        "timestamp": 1622123573863,
        "market": "BTC-EUR"
    }
]

This endpoint retrieves the trades.

Rate limiting weight: 5

HTTP Request

GET https://api.exchange.litebit.eu/v1/trades

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
limit false integer The maximum number of trades to return. Maximum: 200.
timestamp_from false integer The earliest unix timestamp to return trades for.
timestamp_to false integer The latest unix timestamp to return trades for.
Response

200 OK

Array of objects.

Name Type Description
uuid string The UUID of the trade.
amount string The amount of the trade.
price string The price of the trade.
side string The side of the taker. Possible values: buy, sell.
market string The symbol of the market.
timestamp integer The unix timestamp of the trade.

Account management

POST /api-key

curl \
-d '{"name": "admin", "scopes": ["view", "trade"], "allowed_cidr_blocks": ["0.0.0.0/0"]}' \
-H "Content-Type: application/json" \
-X POST "https://api.exchange.litebit.eu/v1/api-key"

The above command returns JSON structured like this:

{
    "secret": "a1aa4e02c0e7a6033e7401a1ea44c15f85d1e72f206997fe77dbcee055b270ec",
    "key": "30646231343663392d353437312d333237352d613437362d3162356661383230383263312ee080f86c60260b2047faa3186c9833188af00534f32ebff14aeedf7523f86feb",
    "name": "admin",
    "scopes": [
        "view",
        "trade"
    ],
    "allowed_cidr_blocks": [
        "0.0.0.0/0"
    ]
}

This endpoint creates an API key.

Rate limiting weight: 5
Required scope: manage_account

HTTP Request

POST https://api.exchange.litebit.eu/v1/api-key

Request body
Parameter Required Type Description
name true string The name of the API key.
scopes true array of string Array of scopes (permissions) to assign to the API key.
allowed_cidr_blocks true array of string Array of CIDR blocks to allow to use the API key.
Response

201 Created

Name Type Description
key string The key of the API key.
secret string The secret of the API key. This is the only moment it is exposed.
name string The name of the API key.
scopes array of string Array of scopes (permissions) that are assigned to the API key.
allowed_cidr_blocks array of string Array of CIDR blocks that are allowed to use the API key.

GET /api-keys

curl "https://api.exchange.litebit.eu/v1/api-keys"

The above command returns JSON structured like this:

[
    {
        "key": "30646231343663392d353437312d333237352d613437362d3162356661383230383263312ed8de9189478fce771b35f7f723651b68495f7aadc7bee75155ae4bced71e2ab7",
        "name": "test",
        "scopes": [
            "trade",
            "withdraw"
        ],
        "allowed_cidr_blocks": [
            "0.0.0.0/0"
        ]
    }
]

This endpoint retrieves your API keys.

Rate limiting weight: 5
Required scope: manage_account

HTTP Request

GET https://api.exchange.litebit.eu/v1/api-keys

Response

200 OK

Array of objects.

Name Type Description
key string The key of the API key.
name string The name of the API key.
scopes array of string Array of scopes (permissions) that are assigned to the API key.
allowed_cidr_blocks array of string Array of CIDR blocks that are allowed to use the API key.

PUT /api-key

curl \
-d '{"key": "30646231343663392d353437312d333237352d613437362d3162356661383230383263312ee080f86c60260b2047faa3186c9833188af00534f32ebff14aeedf7523f86feb", "name": "admin", "scopes": ["view", "trade"], "allowed_cidr_blocks": ["0.0.0.0/0"]}' \
-H "Content-Type: application/json" \
-X PUT "https://api.exchange.litebit.eu/v1/api-key"

This endpoint updates an API key.

Rate limiting weight: 5
Required scope: manage_account

HTTP Request

PUT https://api.exchange.litebit.eu/v1/api-key

Request body
Parameter Required Type Description
key true string The key of the API key that you want to update.
name true string The name of the API key.
scopes true array of string Array of scopes (permissions) to assign to the API key.
allowed_cidr_blocks true array of string Array of CIDR blocks to allow to use the API key.
Response

204 No Content

DELETE /api-key

curl \
-d '{"key": "30646231343663392d353437312d333237352d613437362d3162356661383230383263312ee080f86c60260b2047faa3186c9833188af00534f32ebff14aeedf7523f86feb"}' \
-H "Content-Type: application/json" \
-X DELETE "https://api.exchange.litebit.eu/v1/api-key"

This endpoint deletes an API key.

Rate limiting weight: 5
Required scope: manage_account

HTTP Request

DELETE https://api.exchange.litebit.eu/v1/api-key

Request body
Parameter Required Type Description
key true string The key of the API key that you want to delete.
Response

204 No content

Trading

POST /order

curl \
-d '{"market": "BTC-EUR", "amount": "0.01", "type": "limit", "price": "1000", "side": "buy", "post_only": true, "time_in_force": "gtc", "client_id": "d22a7a4e-c28b-40f5-a5a4-79ca8a4fc41c"}' \
-H "Content-Type: application/json" \
-X POST "https://api.exchange.litebit.eu/v1/order"

The above command returns JSON structured like this:

{
    "uuid": "69d353dc-a80f-491e-b5cf-d2589682664e",
    "amount": "0.01000000",
    "amount_filled": "0.00000000",
    "amount_quote": null,
    "amount_quote_filled": "0.00000000",
    "fee": "0.00000000",
    "price": "1000.00",
    "side": "buy",
    "type": "limit",
    "status": "open",
    "filled_status": "not_filled",
    "cancel_status": null,
    "stop": null,
    "stop_price": null,
    "post_only": true,
    "time_in_force": "gtc",
    "created_at": 1637147943854,
    "updated_at": 1637147943854,
    "expire_at": null,
    "market": "BTC-EUR",
    "client_id": "d22a7a4e-c28b-40f5-a5a4-79ca8a4fc41c"
}

This endpoint creates an order.

Rate limiting weight: 1
Required scope: trade

HTTP Request

POST https://api.exchange.litebit.eu/v1/order

Request body
Parameter Required Type Description
market true string The symbol of the market.
side true string Determines whether the base asset will be bought or sold. Possible values: buy, sell.
type true string The type of the order. For limit orders, amount and price are required. For market orders, amount is required. Possible values: limit, market.
amount Only if amount_quote is not set string The amount to buy or sell in base asset.
amount_quote Only if amount is not set string Only for market orders: the amount to buy or sell in quote asset including fee.
price Only for limit orders string Specifies the amount in quote asset that is paid/received for each unit of base asset.
post_only false boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled. Default: false.
time_in_force false string Only for limit orders: determines how long the order remains active. Default: gtc. Possible values: gtc, ioc, fok.
client_id false string The ID that you would like to assign to the order. You may use this field to more easily identify your orders.
Response

201 Created

Name Type Description
uuid string The UUID of the order.
amount string The amount of base asset to buy or sell.
amount_filled string The total amount of base asset bought/sold.
amount_quote string Only for market orders: the amount to buy or sell in quote asset including fee.
amount_quote_filled string The total amount of quote asset paid/received including fee.
fee string The fee paid for the order.
price string Only for limit orders: specifies the amount in quote asset that is paid/received for each unit of base asset.
side string The side of the order. Possible values: buy, sell.
type string The type of the order. Possible values: limit, market.
status string The status of the order. Possible values: created, open, closed.
filled_status string The filled status of the order. Possible values: not_filled, partially_filled, filled.
cancel_status string The cancel status of the order. Possible values: cancelled_user, cancelled_obsolete_market, cancelled_market_protection, cancelled_post_only, cancelled_self_trade_prevention, cancelled_tif_ioc, cancelled_tif_fok, cancelled_tif_day, cancelled_tif_gtd, cancelled_insufficient_liquidity, cancelled_insufficient_reserved_amount, cancelled_max_number_of_open_orders_reached, cancelled_other.
stop string Possible values: entry, loss. When set to entry, the order is triggered when the last price is greater than or equal to stop_price. When set to loss, the order is triggered when the last price is less than or equal to stop_price. This field is currently not used.
stop_price string The price at which the order will be triggered. This field is currently not used.
post_only boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
time_in_force string Only for limit orders: determines how long the order remains active. Possible values: gtc, ioc, fok, day, gtd. The following values are currently not used: day and gtd.
created_at integer The unix timstamp at which the order was created.
updated_at integer The unix timestamp of the last update of the order.
expire_at integer The unix timestamp at which the order expires. This field is currently not used.
market string The symbol of the market.
client_id string The ID that you assigned to the order.

GET /orders/open

curl "https://api.exchange.litebit.eu/v1/orders/open"

The above command returns JSON structured like this:

[
    {
        "uuid": "4260cd4a-35ba-41af-a63d-b0f1a127f2ab",
        "amount": "0.49875000",
        "amount_filled": "0.00000000",
        "amount_quote": null,
        "amount_quote_filled": "0.00000000",
        "fee": "0.00000000",
        "price": "0.0000",
        "side": "buy",
        "type": "market",
        "status": "open",
        "filled_status": "not_filled",
        "cancel_status": null,
        "stop": null,
        "stop_price": null,
        "post_only": false,
        "time_in_force": "gtc",
        "created_at": 1620112337000,
        "updated_at": 1620112337000,
        "expire_at": null,
        "market": "BTC-EUR",
        "client_id": null
    }
]

This endpoint retrieves all open orders.

Rate limiting weight: 5 (single market) / 20 (all markets)
Required scope: trade or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/orders/open

Query Parameters
Parameter Required Type Description
market false string The symbol of the market.
Response

200 OK

Array of objects.

Name Type Description
uuid string The UUID of the order.
amount string The amount of base asset to buy or sell.
amount_filled string The total amount of base asset bought/sold.
amount_quote string Only for market orders: the amount to buy or sell in quote asset including fee.
amount_quote_filled string The total amount of quote asset paid/received including fee.
fee string The fee paid for the order.
price string Only for limit orders: specifies the amount in quote asset that is paid/received for each unit of base asset.
side string The side of the order. Possible values: buy, sell.
type string The type of the order. Possible values: limit, market.
status string The status of the order. Possible values: created, open, closed.
filled_status string The filled status of the order. Possible values: not_filled, partially_filled, filled.
cancel_status string The cancel status of the order. Possible values: cancelled_user, cancelled_obsolete_market, cancelled_market_protection, cancelled_post_only, cancelled_self_trade_prevention, cancelled_tif_ioc, cancelled_tif_fok, cancelled_tif_day, cancelled_tif_gtd, cancelled_insufficient_liquidity, cancelled_insufficient_reserved_amount, cancelled_max_number_of_open_orders_reached, cancelled_other.
stop string Possible values: entry, loss. When set to entry, the order is triggered when the last price is greater than or equal to stop_price. When set to loss, the order is triggered when the last price is less than or equal to stop_price. This field is currently not used.
stop_price string The price at which the order will be triggered. This field is currently not used.
post_only boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
time_in_force string Only for limit orders: determines how long the order remains active. Possible values: gtc, ioc, fok, day, gtd. The following values are currently not used: day and gtd.
created_at integer The unix timstamp at which the order was created.
updated_at integer The unix timestamp of the last update of the order.
expire_at integer The unix timestamp at which the order expires. This field is currently not used.
market string The symbol of the market.
client_id string The ID that you assigned to the order.

GET /orders/closed

curl "https://api.exchange.litebit.eu/v1/orders/closed?market=BTC-EUR"

The above command returns JSON structured like this:

[
    {
        "uuid": "4260cd4a-35ba-41af-a63d-b0f1a127f2ab",
        "amount": "0.49875000",
        "amount_filled": "0.00000000",
        "amount_quote": null,
        "amount_quote_filled": "0.00000000",
        "fee": "0.00000000",
        "price": "0.0000",
        "side": "buy",
        "type": "market",
        "status": "closed",
        "filled_status": "not_filled",
        "cancel_status": null,
        "stop": null,
        "stop_price": null,
        "post_only": false,
        "time_in_force": "gtc",
        "created_at": 1620112337000,
        "updated_at": 1620112337000,
        "expire_at": null,
        "market": "BTC-EUR",
        "client_id": null
    }
]

This endpoint retrieves all closed orders.

Rate limiting weight: 5
Required scope: trade or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/orders/closed

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
limit false integer The maximum number of orders to return. Maximum: 200.
created_at_from false integer The earliest unix timestamp to return orders for.
created_at_to false integer The latest unix timestamp to return orders for.
Response

200 OK

Array of objects.

Name Type Description
uuid string The UUID of the order.
amount string The amount of base asset to buy or sell.
amount_filled string The total amount of base asset bought/sold.
amount_quote string Only for market orders: the amount to buy or sell in quote asset including fee.
amount_quote_filled string The total amount of quote asset paid/received including fee.
fee string The fee paid for the order.
price string Only for limit orders: specifies the amount in quote asset that is paid/received for each unit of base asset.
side string The side of the order. Possible values: buy, sell.
type string The type of the order. Possible values: limit, market.
status string The status of the order. Possible values: created, open, closed.
filled_status string The filled status of the order. Possible values: not_filled, partially_filled, filled.
cancel_status string The cancel status of the order. Possible values: cancelled_user, cancelled_obsolete_market, cancelled_market_protection, cancelled_post_only, cancelled_self_trade_prevention, cancelled_tif_ioc, cancelled_tif_fok, cancelled_tif_day, cancelled_tif_gtd, cancelled_insufficient_liquidity, cancelled_insufficient_reserved_amount, cancelled_max_number_of_open_orders_reached, cancelled_other.
stop string Possible values: entry, loss. When set to entry, the order is triggered when the last price is greater than or equal to stop_price. When set to loss, the order is triggered when the last price is less than or equal to stop_price. This field is currently not used.
stop_price string The price at which the order will be triggered. This field is currently not used.
post_only boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
time_in_force string Only for limit orders: determines how long the order remains active. Possible values: gtc, ioc, fok, day, gtd. The following values are currently not used: day and gtd.
created_at integer The unix timstamp at which the order was created.
updated_at integer The unix timestamp of the last update of the order.
expire_at integer The unix timestamp at which the order expires. This field is currently not used.
market string The symbol of the market.
client_id string The ID that you assigned to the order.

GET /order

curl "https://api.exchange.litebit.eu/v1/order?market=BTC-EUR&uuid=4260cd4a-35ba-41af-a63d-b0f1a127f2ab"

The above command returns JSON structured like this:

{
    "uuid": "4260cd4a-35ba-41af-a63d-b0f1a127f2ab",
    "amount": "0.49875000",
    "amount_filled": "0.00000000",
    "amount_quote": null,
    "amount_quote_filled": "0.00000000",
    "fee": "0.00000000",
    "price": "0.0000",
    "side": "buy",
    "type": "market",
    "status": "open",
    "filled_status": "not_filled",
    "cancel_status": null,
    "stop": null,
    "stop_price": null,
    "post_only": false,
    "time_in_force": "gtc",
    "created_at": 1620112337000,
    "updated_at": 1620112337000,
    "expire_at": null,
    "market": "BTC-EUR",
    "client_id": null
}

This endpoint retrieves an order.

Rate limiting weight: 1
Required scope: trade or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/order

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
uuid true string The UUID of the order.
Response

200 OK

Name Type Description
uuid string The UUID of the order.
amount string The amount of base asset to buy or sell.
amount_filled string The total amount of base asset bought/sold.
amount_quote string Only for market orders: the amount to buy or sell in quote asset including fee.
amount_quote_filled string The total amount of quote asset paid/received including fee.
fee string The fee paid for the order.
price string Only for limit orders: specifies the amount in quote asset that is paid/received for each unit of base asset.
side string The side of the order. Possible values: buy, sell.
type string The type of the order. Possible values: limit, market.
status string The status of the order. Possible values: created, open, closed.
filled_status string The filled status of the order. Possible values: not_filled, partially_filled, filled.
cancel_status string The cancel status of the order. Possible values: cancelled_user, cancelled_obsolete_market, cancelled_market_protection, cancelled_post_only, cancelled_self_trade_prevention, cancelled_tif_ioc, cancelled_tif_fok, cancelled_tif_day, cancelled_tif_gtd, cancelled_insufficient_liquidity, cancelled_insufficient_reserved_amount, cancelled_max_number_of_open_orders_reached, cancelled_other.
stop string Possible values: entry, loss. When set to entry, the order is triggered when the last price is greater than or equal to stop_price. When set to loss, the order is triggered when the last price is less than or equal to stop_price. This field is currently not used.
stop_price string The price at which the order will be triggered. This field is currently not used.
post_only boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
time_in_force string Only for limit orders: determines how long the order remains active. Possible values: gtc, ioc, fok, day, gtd. The following values are currently not used: day and gtd.
created_at integer The unix timstamp at which the order was created.
updated_at integer The unix timestamp of the last update of the order.
expire_at integer The unix timestamp at which the order expires. This field is currently not used.
market string The symbol of the market.
client_id string The ID that you assigned to the order.

DELETE /orders

This endpoint cancels one or multiple orders.

curl -X DELETE "https://api.exchange.litebit.eu/v1/orders"

The above command returns JSON structured like this:

[
    {
        "uuid": "234234897234-1243-1234-qsf234"
    }
]

Rate limiting weight: 1
Required scope: trade

HTTP Request

DELETE https://api.exchange.litebit.eu/v1/orders

Request body
Parameter Required Type Description
market Only if orders is set string Filter used to specify for which market orders should be canceled. If market is not specified, all open orders will be canceled.
orders false array Array of UUIDs of the orders.
Response

200 OK

Array of objects.

Name Type Description
uuid string The UUID of the order.

GET /fills

curl "https://api.exchange.litebit.eu/v1/fills?market=BTC-EUR"

The above command returns JSON structured like this:

[
    {
        "uuid": "234234897234-1243-1234-qsf234",
        "order_uuid": "234234897234-1243-1234-qsf235",
        "amount": "0.00100000",
        "price": "42986.64",
        "amount_quote": "43.09410660",
        "side": "buy",
        "fee": "0.10746660",
        "market": "BTC-EUR",
        "liquidity": "taker",
        "timestamp": 1622123573863
    }
]

This endpoint retrieves all fills.

Rate limiting weight: 5
Required scope: trade or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/fills

Query Parameters
Parameter Required Type Description
market true string The symbol of the market.
order_uuid false string The UUID of the order.
limit false integer The maximum number of fills to return. Maximum: 200.
timestamp_from false integer The earliest unix timestamp to return fills for.
timestamp_to false integer The latest unix timestamp to return fills for.
Response

200 OK

Array of objects.

Name Type Description
uuid string The UUID of the fill.
order_uuid string The UUID of the order.
amount string The total amount of base asset bought/sold.
price string The price of the fill.
amount_quote string The total amount of quote asset paid/received including fee.
side string The side of the fill. Possible values: buy, sell.
fee string The fee paid for this fill.
market string The symbol of the market.
liquidity string The liquidity of fill. Possiblue values: taker, maker.
timestamp integer The unix timestamp of the fill.

GET /fee

curl "https://api.exchange.litebit.eu/v1/fee"

The above command returns JSON structured like this:

{
    "maker": "0.15000000",
    "taker": "0.25000000",
    "volume": "11.70"
}

This endpoint retrieves your current fee level.

Rate limiting weight: 5
Required scope: trade or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/fee

Response

200 OK

Name Type Description
maker string Current maker fee (in %).
taker string Current taker fee (in %).
volume string Volume in € during the the last 30 days.

GET /fees

curl "https://api.exchange.litebit.eu/v1/fees"

The above command returns JSON structured like this:

[
    {
        "volume": "0.00000000",
        "maker": "0.15000000",
        "taker": "0.25000000"
    }
]

This endpoint retrieves the fee schedules.

Rate limiting weight: 1

HTTP Request

GET https://api.exchange.litebit.eu/v1/fees

Response

200 OK

Array of objects.

Name Type Description
maker string Maker fee (in %).
taker string Taker fee (in %).
volume string Volume in € during the the last 30 days.

Wallet

GET /balances

curl "https://api.exchange.litebit.eu/v1/balances"

The above command returns JSON structured like this:

[
    {
        "available": "8719.52490619",
        "reserved": "101.55383733",
        "total": "8821.07874352",
        "asset": "EUR"
    }
]

This endpoint retrieves your balances.

Rate limiting weight: 5
Required scope: view

HTTP Request

GET https://api.exchange.litebit.eu/v1/balances

Response

200 OK

Array of objects.

Name Type Description
available string The amount that is available to trade or withdraw.
reserved string The amount that is currently reserved, e.g. for open orders.
total string The total amount (available + reserved).
asset string The code of the asset.

GET /balance

curl "https://api.exchange.litebit.eu/v1/balance?asset=BTC"

The above command returns JSON structured like this:

{
    "available": "8719.52490619",
    "reserved": "101.55383733",
    "total": "8821.07874352",
    "asset": "EUR"
}

This endpoint retrieves a balance.

Rate limiting weight: 5
Required scope: view

HTTP Request

GET https://api.exchange.litebit.eu/v1/balance

Query Parameters
Parameter Required Type Description
asset true string The code of the asset.
Response

200 OK

Name Type Description
available string The amount that is available to trade or withdraw.
reserved string The amount that is currently reserved, e.g. for open orders.
total string The total amount (available + reserved).
asset string The code of the asset.

POST /withdraw/blockchain

curl
-d '{"asset": "BTC", "amount": "0.01", "address": "3E8ociqZa9mZUSwGdSmAEMAoAxBK3FNDcd"}'
-H "Content-Type: application/json"
-X POST "https://api.exchange.litebit.eu/v1/withdraw/blockchain"

The above command returns JSON structured like this:

{
    "id": "crypto-391295",
    "method": "blockchain",
    "asset": "BTC",
    "amount": "0.01000000",
    "fee": "0.00000001",
    "status": "pending",
    "created_at": 1662622018800,
    "updated_at": 1662622026063,
    "transaction_details": {
      "address": "3E8ociqZa9mZUSwGdSmAEMAoAxBK3FNDcd",
      "tag": "",
      "transaction_id": ""
    }
}

This endpoint creates a withdrawal.

Rate limiting weight: 5
Required scope: withdraw

HTTP Request

POST https://api.exchange.litebit.eu/v1/withdraw/blockchain

Request body
Parameter Required Type Description
asset true string The code of the asset.
amount true string The amount to be withdrawn including fee.
address true string The wallet address to withdraw the funds to.
tag false string Tag/memo/payment_id for the transaction.
Response

201 Created

Name Type Description
id string The ID of the withdrawal.
method string The method of the withdrawal. Possible values: sepa, blockchain.
asset string The code of the asset.
amount string The amount that was withdrawn including fee.
fee string The fee paid for this withdrawal.
status string The status of the withdrawal. Possible values for method sepa: confirmed, cancelled, completed, in_sepa_batch, invalid_payment_details, on_hold. Possible values for method blockchain: pending, checked, complete, on hold, invalid address, cancelled, being withdrawn.
created_at integer The unix timestamp at which the withdrawal was created.
updated_at integer The unix timestamp of the last update of the withdrawal.
transaction_details object The transaction details of the withdrawal.
transaction_details.address string The address funds were withdrawn to.
transaction_details.tag string Only for blockchain method: tag/memo/payment_id of the transaction.
transaction_details.transaction_id string Only for blockchain method: the transaction id of the withdrawal on the blockchain.

POST /withdraw/sepa

curl
-d '{"amount": "1234.56", "address": "NL57RABO0123456789"}'
-H "Content-Type: application/json"
-X POST "https://api.exchange.litebit.eu/v1/withdraw/sepa"

The above command returns JSON structured like this:

{
    "id": "fiat-85173",
    "method": "sepa",
    "asset": "EUR",
    "amount": "1234.56",
    "fee": "0.01",
    "status": "confirmed",
    "created_at": 1662622018800,
    "updated_at": 1662622026063,
    "transaction_details": {
      "address": "NL57RABO0123456789",
      "tag": "",
      "transaction_id": ""
    }
}

This endpoint creates a withdrawal.

Rate limiting weight: 5
Required scope: withdraw

HTTP Request

POST https://api.exchange.litebit.eu/v1/withdraw/sepa

Request body
Parameter Required Type Description
amount true string The amount to be withdrawn including fee.
address true string The IBAN address to withdraw the funds to.
Response

201 Created

Name Type Description
id string The ID of the withdrawal.
method string The method of the withdrawal. Possible values: sepa, blockchain.
asset string The code of the asset.
amount string The amount that was withdrawn including fee.
fee string The fee paid for this withdrawal.
status string The status of the withdrawal. Possible values for method sepa: confirmed, cancelled, completed, in_sepa_batch, invalid_payment_details, on_hold. Possible values for method blockchain: pending, checked, complete, on hold, invalid address, cancelled, being withdrawn.
created_at integer The unix timestamp at which the withdrawal was created.
updated_at integer The unix timestamp of the last update of the withdrawal.
transaction_details object The transaction details of the withdrawal.
transaction_details.address string The address funds were withdrawn to.
transaction_details.tag string Only for blockchain method: tag/memo/payment_id of the transaction.
transaction_details.transaction_id string Only for blockchain method: the transaction id of the withdrawal on the blockchain.

GET /withdrawals

curl "https://api.exchange.litebit.eu/v1/withdrawals"

The above command returns JSON structured like this:

[
    {
        "id": "fiat-85173",
        "method": "sepa",
        "asset": "EUR",
        "amount": "1234.56",
        "fee": "0.01",
        "status": "confirmed",
        "created_at": 1662622018800,
        "updated_at": 1662622026063,
        "transaction_details": {
          "address": "NL57RABO0123456789",
          "tag": "",
          "transaction_id": ""
        }
    }
]

This endpoint retrieves all withdrawals.

Rate limiting weight: 20
Required scope: withdraw or view

HTTP Request

GET https://api.exchange.litebit.eu/v1/withdrawals

Query Parameters
Parameter Required Type Description
asset false string The asset of the withdrawals.
limit false integer The maximum number of withdrawals to return. Maximum: 200.
created_at_from false integer The earliest unix timestamp to return withdrawals for.
created_at_to false integer The latest unix timestamp to return withdrawals for.
Response

200 OK

Array of objects.

Name Type Description
id string The ID of the withdrawal.
method string The method of the withdrawal. Possible values: sepa, blockchain.
asset string The code of the asset.
amount string The amount that was withdrawn including fee.
fee string The fee paid for this withdrawal.
status string The status of the withdrawal. Possible values for method sepa: confirmed, cancelled, completed, in_sepa_batch, invalid_payment_details, on_hold. Possible values for method blockchain: pending, checked, complete, on hold, invalid address, cancelled, being withdrawn.
created_at integer The unix timestamp at which the withdrawal was created.
updated_at integer The unix timestamp of the last update of the withdrawal.
transaction_details object The transaction details of the withdrawal.
transaction_details.address string The address funds were withdrawn to.
transaction_details.tag string Only for blockchain method: tag/memo/payment_id of the transaction.
transaction_details.transaction_id string Only for blockchain method: the transaction id of the withdrawal on the blockchain.

GET /deposits

curl "https://api.exchange.litebit.eu/v1/deposits"

The above command returns JSON structured like this:

[
    {
        "id": "fiat-152175",
        "method": "sepa",
        "asset": "EUR",
        "amount": "1234.56",
        "fee": "0.01",
        "status": "order_success",
        "created_at": 1662622018800,
        "updated_at": 1662622026063,
        "transaction_details": {
          "address": "NL57RABO0123456789",
          "tag": "",
          "transaction_id": ""
        }
    }
]

This endpoint retrieves all deposits.

Rate limiting weight: 20
Required scope: view

HTTP Request

GET https://api.exchange.litebit.eu/v1/deposits

Query Parameters
Parameter Required Type Description
asset false string The asset of the deposits.
limit false integer The maximum number of deposits to return. Maximum: 200.
created_at_from false integer The earliest unix timestamp to return deposits for.
created_at_to false integer The latest unix timestamp to return deposits for.
Response

200 OK

Array of objects.

Name Type Description
id string The ID of the deposit.
method string The method of the deposit. Possible values: sepa, blockchain.
asset string The code of the asset.
amount string The amount that was deposited before the fee has been subtracted.
fee string The fee paid for this deposit.
status string The status of the deposit. Possible values for method sepa: order_processing, order_paid, order_completing, order_success, order_cancelled, order_on_hold, order_expired, order_refunded, order_success, order_iban_verification, order_awaiting_payment. Possible values for method blockchain: completed, pending, cancelled.
created_at integer The unix timestamp at which the deposit was created.
updated_at integer The unix timestamp of the last update of the deposit.
transaction_details object The transaction details of the deposit.
transaction_details.address string The address funds were deposited from.
transaction_details.tag string Only for blockchain method: tag/memo/payment_id of the transaction.
transaction_details.transaction_id string Only for blockchain method: the transaction id of the deposit on the blockchain.

WebSockets

General

The URL is wss://ws.exchange.litebit.eu/v1.

Some remarks:

Authentication

A WebSocket can be authenticated using the authenticate method.

Message protocol

We distinguish two types of messages: requests and responses. Messages sent by clients to the server are considered as requests. Messages sent by the server to a client are considered as responses.


Request

Key Required Type Description
rid no integer ID of the request. If it is included, then the response will contain the same identifier.
event yes string Name of the event/method.
data yes any Body of the request. The event of the message determines the schema to which the body must adhere.

Response

Key Required Type Description
rid no integer ID of the request. This key is only included in messages sent directly in response to a request, not in messages related to subscriptions.
event yes string Name of the event/method.
data yes no Body of the response. The event of the message determines the schema to which the body must adhere.

Errors

{
  "rid": 1147483647,
  "event": "error",
  "data": {
    "code": 10012,
    "message": "Invalid channel."
  }
}

Most errors will cause a response with the event error to be emitted. Error messages have a key data with more information about the error.

For more information about the error codes that you may encounter, see this section.

Rate limits

The number of messages sent by a client on each connection is rate-limited to 50 per second. A maximum of 20 connections can be opened per minute.

For more information about the general rate limiting, click here.

Channels

ticker

{
  "event": "ticker",
  "data": {
    "market": "BTC-EUR",
    "open": "1.12345678",
    "last": "1.12345678",
    "volume": "1.12345678",
    "low": "1.12345678",
    "high": "1.12345678",
    "bid": "1.12345678",
    "ask": "1.12345678"
  }
}

Channel on which ticker updates are published.

Name: ticker for all markets or ticker:<market> for a given market (e.g. ticker:BTC-EUR)

Name Type Description
market string The symbol of the market.
open string The price of the first trade during the last 24 hours.
last string The price of the last trade.
volume string The volume during the last 24 hours in base asset.
low string The lowest price of a trade during the last 24 hours.
high string The highest price of a trade during the last 24 hours.
bid string The current best bid price.
ask string The current best ask price.

book

{
  "event": "book",
  "data": {
    "market": "BTC-EUR",
    "sequence": 1231232,
    "update_type": "snapshot",
    "timestamp": 1622123573863,
    "asks": [
      [<price>, <amount>],
      ...,
    ],
    "bids": [
      [<price>, <amount>],
      ...,
    ]
  }
}

Channel on which book updates are published.

Name: book:<market>, e.g. book:BTC-EUR

Name Type Description
market string The symbol of the market.
timestamp integer The timestamp of this orderbook state.
sequence integer Sequence number of this orderbook state. Incremented by one for every update of the book.
update_type string The type of update: snapshot or delta.
bids array of [string, string] Array of bids: [price, amount], where an amount of 0 means the price level no longer exists, otherwise the returned amount is the new total amount on that price level.
asks array of [string, string] Array of asks: [price, amount], where an amount of 0 means the price level no longer exists, otherwise the returned amount is the new total amount on that price level.

Keeping track of an orderbook locally

trades

{
  "event": "trade",
  "data": {
    "uuid": "9beba3ae-4755-4f06-82be-60b2a3452926",
    "amount": "0.41322185",
    "price": "38218.40000000",
    "side": "buy",
    "timestamp": 1622123573863,
    "market": "BTC-EUR"
  }
}

Channel on which new trades are published.

Name: trades:<market>, e.g. trades:BTC-EUR

Name Type Description
uuid string The UUID of the trade.
amount string The amount of the trade.
price string The price of the trade.
side string The side of the taker. Possible values: buy, sell.
market string The symbol of the market.
timestamp integer The unix timestamp of the trade.

candles

{
  "event": "candle",
  "data": {
    "market": "BTC-EUR",
    "interval": 900,
    "ohlcv": [1525337100, "0.1221", "0.1460", "0.1032", "0.1538", "5.305"]
  }
}

Channel on which new and updated candles are published.

Name: candles:<market>:<interval>, e.g. candles:BTC-EUR:300

Possible values for interval: 60 (1 minute), 300 (5 minutes), 900 (15 minutes), 3600 (1 hour), 14400 (4 hours) and 86400 (1 day)

Name Type Description
market string The symbol of the market.
interval integer The interval of the candle.
ohlcv array Timestamp, open, high, low, close and volume of the candle.

orders

{
  "event": "order",
  "data": {
    "uuid": "5f7bda37-5dac-4525-bd72-14df3fbc6f82",
    "amount": "1.00000000",
    "amount_filled": "0.00000000",
    "amount_quote": null,
    "amount_quote_filled": "0.00000000",
    "fee": "0.00000000",
    "price": "0.01635866",
    "side": "buy",
    "type": "limit",
    "status": "open",
    "filled_status": "not_filled",
    "cancel_status": null,
    "stop": null,
    "stop_price": null,
    "post_only": false,
    "time_in_force": "gtc",
    "created_at": 1614919085000,
    "updated_at": 1614919085000,
    "expire_at": null,
    "market": "BTC-EUR",
    "client_id": null
  }
}

Channel on which new and updated orders are published.

Name: orders

Required scope: trade or view

Name Type Description
uuid string The UUID of the order.
amount string The amount of base asset to buy or sell.
amount_filled string The total amount of base asset bought/sold.
amount_quote string Only for market orders: the amount to buy or sell in quote asset including fee.
amount_quote_filled string The total amount of quote asset paid/received including fee.
fee string The fee paid for the order.
price string Only for limit orders: specifies the amount in quote asset that is paid/received for each unit of base asset.
side string The side of the order. Possible values: buy, sell.
type string The type of the order. Possible values: limit, market.
status string The status of the order. Possible values: created, open, closed.
filled_status string The filled status of the order. Possible values: not_filled, partially_filled, filled.
cancel_status string The cancel status of the order. Possible values: cancelled_user, cancelled_obsolete_market, cancelled_market_protection, cancelled_post_only, cancelled_self_trade_prevention, cancelled_tif_ioc, cancelled_tif_fok, cancelled_tif_day, cancelled_tif_gtd, cancelled_insufficient_liquidity, cancelled_insufficient_reserved_amount, cancelled_max_number_of_open_orders_reached, cancelled_other.
stop string Possible values: entry, loss. When set to entry, the order is triggered when the last price is greater than or equal to stop_price. When set to loss, the order is triggered when the last price is less than or equal to stop_price. This field is currently not used.
stop_price string The price at which the order will be triggered. This field is currently not used.
post_only boolean Only for limit orders: when set to true, the order will not fill against existing orders. This is useful if you want to ensure you pay the maker fee. If the order would fill against existing orders, the entire order will be canceled.
time_in_force string Only for limit orders: determines how long the order remains active. Possible values: gtc, ioc, fok, day, gtd. The following values are currently not used: day and gtd.
created_at integer The unix timstamp at which the order was created.
updated_at integer The unix timestamp of the last update of the order.
expire_at integer The unix timestamp at which the order expires. This field is currently not used.
market string The symbol of the market.
client_id string The ID that you assigned to the order.

fills

{
  "event": "fill",
  "data": {
    "uuid": "234234897234-1243-1234-qsf234",
    "order_uuid": "234234897234-1243-1234-qsf235",
    "amount": "0.00100000",
    "price": "42986.64",
    "amount_quote": "43.09410660",
    "side": "buy",
    "fee": "0.10746660",
    "market": "BTC-EUR",
    "liquidity": "taker",
    "timestamp": 1622123573863
  }
}

Channel on which new fills are published.

Name: fills

Required scope: trade or view

Name Type Description
uuid string The UUID of the fill.
order_uuid string The UUID of the order.
amount string The total amount of base asset bought/sold.
price string The price of the fill.
amount_quote string The total amount of quote asset paid/received including fee.
side string The side of the fill. Possible values: buy, sell.
fee string The fee paid for this fill.
market string The symbol of the market.
liquidity string The liquidity of fill. Possiblue values: taker, maker.
timestamp integer The unix timestamp of the fill.

Methods

authenticate

{
  "rid": 1147483647,
  "event": "authenticate",
  "data": {
    "api_key": "<api_key>",
    "timestamp": 1632392797512,
    "signature": "<signature>"
  }
}

The above request returns a response like this:

{
  "rid": 1147483647,
  "event": "authenticate"
}

This method authenticates the current connection. This is required for certain messages, such as private subscriptions.

Authentication requests that are not received within a window of 10 seconds from the timestamp of the message are not processed.

Request body
Parameter Required Type Description
api_key true string The key of your API key.
timestamp true integer The current unix timestamp in milliseconds.
signature true string Signature of event + timestamp (click here for the documentation regarding message signing), e.g. authenticate1632392797512.
Response
Result Response
SUCCESS acknowledgement
ERROR error

subscribe

{
  "rid": 1147483647,
  "event": "subscribe",
  "data": ["book:BTC-EUR"]
}

The above request returns a response like this:

{
  "rid": 1147483647,
  "event": "subscribe"
}

This method subscribes the current connection to the given channels.

Please note that in order to subscribe to private channels, you first need to authenticate your connection.

Request body

Array of channel names to subscribe to. For the list of available channels, click here.

Response
Result Response
SUCCESS acknowledgement
ERROR error

unsubscribe

{
  "rid": 1147483647,
  "event": "unsubscribe",
  "data": ["book:BTC-EUR"]
}

The above request returns a response like this:

{
  "rid": 1147483647,
  "event": "unsubscribe"
}

This method unsubscribes the current connection from the given channels.

Request body

Array of channel names to unsubscribe from.

Response
Result Response
SUCCESS acknowledgement
ERROR error

ping

{
  "rid": 1147483647,
  "event": "ping"
}

The above request returns a response like this:

{
  "rid": 1147483647,
  "event": "ping"
}

This method can be used to determine whether the current connection is still alive. This is an application level ping as opposed to the default ping in the WebSockets protocol (which is server initiated).

Response
Result Response
SUCCESS acknowledgement