map

Trading core settings

  • currency_pair_separator – symbol of trade pair delimitation
  • web_app_port – port, which connects the web interface via TCP protocol to the trading core. Access on this port is possible only through a local connection (external access is closed). By default - 1330 port
  • marketmaker_port – the port on which market maker can connect to the trading core. Access is provided by IP restriction. By default - 1340 port
  • daemon_port – port, through which the interaction of notification system and exchange trading core occurs. NodeJS is used as a notification system. In addition to the notification functionality, the NodeJS system deals with the insertion into the database of information about new orders, transactions, and changing the status of orders. It is possible to configure access only to a local connection or via IP restriction. By default - 1350 port
  • reserve_port – the port on which the interaction of the main trading core and the reserve occurs. All the commands that enter the main core of the exchange are broadcast to the reserve core. Thus, if the data center fails, it is possible to instantly switch to reserve server and continue working in the normal mode. By default - 1360 port
  • admin_user_id – this parameter specifies the unique identifier of the administrator according to the users table. This value is used in the formation of leverage on the part of the exchange. If the leverage is formed from the exchange, then the system does not check the sufficiency of available funds for the formation of the leverage. Also, this value is used to be able to suspend/resume any other trader's leverage
  • queue_delay – delay (ms), used when processing the commands of empty queues in the following threads: the call flow of standard and periodic functions and the flow for sending commands to the notification system

Main provisions of interaction

Each command sent to the trading core input, must be in JSON format:

{"0":<func_id>,"1":<param1>,"2":<param2>…}

where

  • <func_id> – the integer number of function,
  • <param1>,<param2> – function parameters

The result of the command is a string (or several strings) also in the JSON format. The first JSON string consists of the incremental number of the command being sent (func_call_id), which indicates that the command submitted to the input is registered by the trading core, and the second and subsequent JSON strings contain the result of the command execution.

Example 1:
We send a command that registers a new user in the trading core. In this command, according to the API (Section 4.1) func_id=100. So, the JSON string will look like this:

{"0":100,"1":123}
  • 100 – command number (func_id)
  • 123 – user ID

On the output, we will get two JSON strings

The first one will contain the incremental number of the command that the trading system assigned as a result of parsing the incoming command

{"0":0,"1":555}
  • 0 – is a successful return code (informing only that the incoming command is accepted for execution)
  • 555 – incremental command number assigned by the trading core

The second will contain the result of the command execution

{"0":555,"1":0}
  • 555 – reference to the incremental command number
  • 0 – is a successful return code telling us that the new user was successfully created in the trading core.

Example 2:
We send a command that tries to register an existing user in the system. In this command, according to the API (Section 4.1) func_id=100. So, the JSON string will look like this:

{"0":100,"1":123}
  • 100 – command number (func_id)
  • 123 – is the ID of the user we have previously registered

On the output, we will get two JSON strings

The first one will contain the incremental number of the command that the trading system assigned as a result of parsing the incoming command

{"0":0,"1":556}
  • 0 – is a successful return code (informing only that the incoming command is accepted for execution)
  • 556 – incremental command number assigned by the trading core

The second will contain the result of the command execution

{"0":556,"1":1}
  • 556 – reference to the incremental command number
  • 1 – is a return code telling us that the user already exists

A list of all possible return codes is described in Section 3

In case when unknown command was sent to the trading core, only one JSON string with an 25 error code is returned (ErrorFunctionNotFound)

Example 3:
We send a command that does not exist:

{"0":777}

We will get the following answer:

{"0":25}
  • 25 – an error code indicating that the function was not found in the trading core

In case when command with invalid JSON format was sent to the trading core, only one JSON string with an 26 error code is returned (ErrorInvalidJsonInput)

Example 4:
We send a command with invalid JSON format:

{100,123}

We will get the following answer:

{"0":26}
  • 26 – an error code indicating that the trading core parser could not parse the JSON string

In case when command being send for a trading pair, on which trading is suspended, only one JSON string with an 40 error code is returned (ErrorMarketClosed)

Basic return codes

Returned code Code name Description
0 Success Success return code
1 ErrorAccountAlreadyExists Account already exist
2 ErrorAccountNotFound Account was not found
3 ErrorAccountAlreadySuspended Account already blocked (when you try to block)
4 ErrorAccountAlreadyUnsuspended Account already unblocked (when you try to unblock user accounts)
5 ErrorAccountSuspended User`s account suspended. Occurs when you try to withdraw funds from the trading account, when you try to delete a user from trading core or when you try to place an order
6 ErrorCrossUserAccessDenied Occurs when you try to modify an object that does not belong to the user
7 ErrorInsufficientFunds Occurs when there is insufficient funds in the account
8 ErrorUserHasActiveOrder Occurs when trying to remove a user from the trading core, if he has active orders or margin funds under position
9 ErrorOrderNotFound Occurs when you try to cancel a non-existent order or to obtain information on non-existent order
10 ErrorInsufficientMarketVolume Occurs when the depth of the order book is insufficient when placing a market order to buy or sell
11 ErrorBorrowedFundsUse Occurs when you try to remove a user from the trading core, if he has open positions
12 ErrorNegativeOrZeroValue Occurs when input parameters are invalidated
13 ErrorNegativeOrZeroId Occurs when input parameters are invalidated: input parameters must be more than zero or not negative
14 ErrorUserHasAvailableFunds Occurs when trying to remove a user from the trading core, if he has funds in the trading accounts
15 ErrorIncorrectStopLossRate Invalid STOPLOSS price value
16 ErrorIncorrectTakeProfitRate Invalid TAKEPROFIT price value
17 ErrorIncorrectTrailingStopOffset Invalid TRAILINGSTOP offset value
23 ErrorNegativeOrZeroLimit Incorrect level of depth in obtaining the depth of the order book
24 ErrorInvalidFunctionArguments Occurs when the input parameters of the command passed to the trading core do not match
25 ErrorFunctionNotFound The command is not found in the trading core
26 ErrorInvalidJsonInput Invalid JSON string passed to the trading core
28 ErrorIncorrectPercValue Invalid percent value
38 ErrorSnapshotBackupFailed Occurs when a backup runtime error in the trading core
39 ErrorSnapshotRestoreFailed Occurs when it is impossible to recover from the backup
40 ErrorMarketClosed This error occurs when trying to place /cancel an order or close a position if trading on the specified trading pair is suspended
41 ErrorMarketAlreadyClosed Trading on the pair has already been suspended
42 ErrorMarketAlreadyOpened Trading on the pair has already been resumed
46 ErrorInvalidCurrency Occurs when the currency code passed to the trading core is empty or NULL
48 ErrorCurrencyNotFound Occurs in the absence of the specified currency in the trading core
49 ErrorCurrencyPairNotFound Occurs in the absence of the specified currency pair in the trading core
50 ErrorCurrencyPairAlreadyExists Occurs when trying to add an existing currency pair to the trading core
51 ErrorStopLossUnavailable Stop loss is not available due to empty order list
52 ErrorTakeProfitUnavailable Take profit is not available due to an empty list of orders
53 ErrorTrailingStopUnavailable Trailing stop is not available due to empty order list
54 ErrorIncorrectDelayValue Invalid delay value (look at queue_delay param in Section 1)
56 ErrorOfferDoesNotExist Occurs in the absence of a loan offer on the leverage
57 ErrorOfferInsufficientFunds Occurs if the amount of margin exceeds the amount provided in the loan
58 ErrorMarginAlreadyClosed Margin trading on the currency pair has already been suspended
59 ErrorMarginAlreadyOpened Margin trading on the currency pair has already been resumed
61 ErrorCreditInUse Occurs when you try to delete a loan offer on which there are open positions
62 ErrorCreditOfferAlreadySuspended The loan offer is already suspended
63 ErrorCreditOfferAlreadyUnsuspended The loan offer is already resumed
64 ErrorPositionNotFound Occurs when position was not found
65 ErrorCanBeForceLiquidation Occurs when you try to open a position, which will be followed by the procedure of liquidation of funds and forced closure

API interactions

Enumeration of variable types:

  • Int32 – 32-bit signed integer. MaxValue: 9223372036854775807
  • Int64 – 64-bit signed integer. MaxValue: 2147483647
  • Decimal – 128-bit signed data type. Range of values: (from -7,9 x 1028 till 7,9 x 1028) / (from 100 till 1028). Accuracy: 28–29 significant digits
  • String – text as a sequence of UTF-16 character codes

Used parameters:

  • func_call_id – multi-threaded increment id of the previous call (Int64)
  • func_id – the number of function API
  • user_id – the user ID of the trading core (Int32)
  • amount – the amount of currency (Decimal)
  • currency_code – trading currency code (String)
  • market_currency_code – market currency code (String)
  • side – order direction (Bool). true – sell order, false – buy order
  • rate – buy/sell price (Decimal)
  • sl_rate – when this price is reached, a market stop loss order is automatically placed (Decimal)
  • tp_rate – when this price is reached, a market take profit order is automatically placed (Decimal)
  • ts_offset – trailing stop price offset (Decimal)
  • new_fee_percent – fee percentage assigned to a specific user for a specific currency
  • order_id – order ID (Int64)
  • deal_id – deal ID (Int64)

The trading core receives commands from the web interface on port 1330 (web_app_port)
When each command gets, the following checks are performed:

  • Check the validity of the JSON string
  • Checking the existence of a command
  • Check for suspension of trading on a currency pair (only for commands: place limit order, place market order and cancel order)
  • Checks for compliance of the transmitted data types in the command parameters

After passing all general checks, this command is replicated to the backup trading core.

Create a user

This command is sent when a new user is added to the trading core.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user

If the check is successfully completed in the trading core, the user opens accounts for all traded currencies and the user is added to the system.

{"0":100,"1":<user_id>}

Blocking user accounts

This command is sent by administrator to block all user accounts.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check if accounts are already blocked

The flag Suspended=true is set for this user in the trading core. Any further attempt to place a buy or sell order is blocked

{"0":200,"1":<user_id>}

Unblocking user accounts

This command is sent by administrator to unblock all user accounts.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check if accounts are already unblocked

The flag Suspended=false is set for this user in the trading core. Resumes the ability to place buy or sell orders

{"0":300,"1":<user_id>}

Delete user

This command is sent by administrator to remove user from trading core.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check the blocking of the account
  • check for open orders
  • check for open positions
  • checking account balances

After passing all the checks, the trading core deletes the accounts for all currencies and the user himself.

{"0":400,"1":<user_id>}

Replenish of funds

This command is sent to the trading core when replenishing the user's trading account.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • verification of the positive amount of replenishment
  • check the existence of the currency

In the trading core, the account is replenished with the specified amount in the specified currency and a message about the new balance of the trading account for this currency is sent to the notification system.

{"0":500,"1":<user_id>,"2":<currency_code>,"3":<amount>}

Withdrawal of funds

This command is sent to the trading core when withdrawing funds from the user's trading account.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check the blocking of the account
  • check for the positivity of the withdrawal amount
  • check the existence of the currency
  • verify that the specified withdrawal amount is sufficient

In the trading core, the account balance is reduced by the specified amount in the specified currency and a message about the new balance of the trading account for this currency is sent to the notification system.

{"0":600,"1":<user_id>,"2":<currency_code>,"3":<amount>}

Place limit order

This command is sent to the trading core when the user places a limit buy/sell order.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a order book
  • check for the existence of the user
  • check the blocking of the account
  • checking the validity of the market currency
  • checking the validity of the trading currency
  • check the transferred values of the amounts to positivity
  • if stop loss price is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the SL level in relation to the market buy price (if the SL is less than the price of the best buy order, the buy order is not placed and an error about the incorrectly set SL price is returned) – if SL is for sale
    • checking the SL level in relation to the market sell price (if the SL is greater than the price of the best sell order, the sell order is not placed and an error about the wrong SL price is returned) – if SL is for buy
  • if take profit price is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the TP level in relation to the market buy price (if the TP is greater than the price of the best buy order, the buy order is not placed and an error is returned about incorrectly set TP price) – if TP is for sale
    • checking the TP level in relation to the market sell price (if the TP is less than the price of the best sell order, the sell order is not placed and an error is returned about the incorrectly set TP price) – if TP is for buy
  • if trailing stop offset is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the TS level in relation to the market buy price (if the difference between the best buy price and the specified TS offset is less than or equal to zero, the buy order is not placed and an error is returned about the incorrectly specified TS offset) – if TS is for sale
    • checking the TS level in relation to the market sell price (if the sum of the specified TS offset and the price of the best sell order is less than or equal to zero, the sell order is not placed and an error about the incorrectly specified TS offset is returned) – if TS is for buy
  • if a buy order is placed
    • checking sufficient funds in the currency market
      • if your own funds are not enough and there is no margin trading for this currency pair, then placing an order with a leverage is not activated and an error occurs about the lack of funds
      • if your own funds are insufficient and margin trading is enabled for this currency pair and a loan offer has been selected, the following checks are performed to be able to open a position:
        • checking for the existence of a loan offer
        • checking the match between the loan currency and the loan offer currency
        • checking available funds in the loan offer to open a position
        • verification of sufficiency of collateral for opening a position
        • validation of open position without immediately forced liquidation of funds
  • if a sell order is placed
    • checking sufficient funds in the traded currency
      • if your own funds are not enough and there is no margin trading for this currency pair, then placing an order with a leverage is not activated and an error occurs about the lack of funds
      • if your own funds are insufficient and margin trading is enabled for this currency pair and a loan offer has been selected, the following checks are performed to be able to open a position:
        • checking for the existence of a loan offer
        • checking the match between the loan currency and the loan offer currency
        • checking available funds in the loan offer to open a position
        • verification of sufficiency of collateral for opening a position
        • validation of open position without immediately forced liquidation of funds

If own funds was used:

As a result of this command, when passing all checks, funds are blocked for opening this order and a notification about the new balance is sent to the notification system, a corresponding buy/sell order is placed and, if necessary, the corresponding conditional orders SL, TP, TS are placed. Information about the orders placed is sent to the notification system. If conditional orders were placed together with the main order, then the orders are relinking and the matching function is activated.

If margin trading was used:

As a result of this command, when passing all the checks, the margin for opening a position is blocked, the required amount from the lender's loan offer is blocked and a notification about the new balance of both the lender and the borrower is sent to the notification system, the corresponding position is set. Conditional orders are not created in this case. The position and margin level are calculated. Information about the formed position is sent to the notification system and matching function is activated.

{"0":700,"1":<user_id>,"2":<market>,"3":<currency>,"4":<side>,"5":<amount>,"6":<rate>,"7":<sl_rate>,"8":<tp_rate>,"9":<ts_offset>,"10":<offer_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <side> – order direction: 1 – sell order, 0 – buy order
  • <amount> – amount of <currency> to buy or sell
  • <rate> – buy or sell price in <market> currency
  • <sl_rate> – stop loss price (in case when the bought currency has gone down, and the best buy price in the order book has become less than or equal to the set price of stop loss, then the sell market order of all already bought currency in the main order is automatically placed to exclude even greater losses; in case when the sold currency has gone up, and the best sell price in the order book has become more or equal to the set price of stop loss, then the buy market order of all already sold currency in the main order is automatically placed to exclude even greater losses)
  • <tp_rate> – take profit price(in case when the bought currency has gone up, and the best buy price in the order book has become greater than or equal to the set price of take profit, then the sell market order of all already bought currency in the main order is automatically placed to fix the profit; in case when the sold currency has gone down, and the best sell price in the order book has become less or equal to the set price of take profit, then the buy market order of all already sold currency in the main order is automatically placed to fix the profit)
  • <ts_offset> – trailing stop price offset. For buy order, the price of the TS order is initially set to the value equal to the difference between the best buy price and the specified offset. For sell order, the price of the TS order is initially set to the value equal to the sum of the best selling price and the specified offset
  • <offer_id> – contains the value of the selected loan offer (when using margin trading). If the leverage was not used, it contains the value 0

In case when the bought currency has gone up, then the price of the TS sell order is pulled up by the difference between the best buy price in the order book and the specified offset; in case when the bought currency has gone down, the condition for triggering the TS order is checked (if the best buy price is less than or equal to the price of the TS order), and if the condition is met, then a sell market order of all bought currency in the main order is automatically placed.

In case when the sold currency has gone down, then the price of the TS buy order is pulled down by the sum of the specified offset and the best sell price in the order book; in case when the sold currency has gone up, the condition for triggering the TS order is checked (if the best sell price is greater than or equal to the price of the TS order), and if the condition is met, then a buy market order of all bought currency in the main order is automatically placed.

If the buy order was placed without leverage:

  • the available funds under the order is blocked
  • a new balance message is sent to the notification system
  • a buy order is placed
  • a message is sent about placing a buy order in the notification system
  • if the SL price has been set, a conditional sell order is placed and a message is sent about placing a conditional sell order
  • if the TP price has been set, a conditional sell order is placed and a message is sent about placing a conditional TP sell order
  • if a TS price offset has been set, a conditional sell order is placed and a message is sent about placing a conditional TS sell order
  • if necessary, the linking of conditional orders is performed
  • running matching procedure with active orders in the current order book

If the sell order was placed without leverage:

  • the available funds under the order is blocked
  • a new balance message is sent to the notification system
  • a sell order is placed
  • a message is sent about placing a sell order in the notification system
  • if the SL price has been set, a conditional buy order is placed and a message is sent about placing a conditional buy order
  • if the TP price has been set, a conditional buy order is placed and a message is sent about placing a conditional TP buy order
  • if a TS price offset has been set, a conditional buy order is placed and a message is sent about placing a conditional TS buy order
  • if necessary, the linking of conditional orders is performed
  • running matching procedure with active orders in the current order book

If a long/short position has been opened:

  • the margin funds under the opening position is blocked with x5 leverage
  • the available funds in the loan offer is blocked under the opening position
  • a message about the new balance of the trader and the lender is sent to the notification system
  • a buy/sell order is placed
  • a message about placing a buy/sell order is sent to the notification system
  • running matching procedure with active orders in the current order book

Place market order

This command is sent to the trading core when the user places a market buy/sell order.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a order book
  • check that the accumaluted bids/asks cover the volume of sell/buy order
  • check for the existence of the user
  • check the blocking of the account
  • checking the validity of the market currency
  • checking the validity of the trading currency
  • check the transferred values of the amounts to positivity
  • if stop loss price is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the SL level in relation to the market buy price (if the SL is less than the price of the best buy order, the buy order is not placed and an error about the incorrectly set SL price is returned) – if SL is for sale
    • checking the SL level in relation to the market sell price (if the SL is greater than the price of the best sell order, the sell order is not placed and an error about the wrong SL price is returned) – if SL is for buy
  • if take profit price is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the TP level in relation to the market buy price (if the TP is greater than the price of the best buy order, the buy order is not placed and an error is returned about incorrectly set TP price) – if TP is for sale
    • checking the TP level in relation to the market sell price (if the TP is less than the price of the best sell order, the sell order is not placed and an error is returned about the incorrectly set TP price) – if TP is for buy
  • if trailing stop offset is specified
    • checking the existence of active buy/sell orders in the order book
    • checking the TS level in relation to the market buy price (if the difference between the best buy price and the specified TS offset is less than or equal to zero, the buy order is not placed and an error is returned about the incorrectly specified TS offset) – if TS is for sale
    • checking the TS level in relation to the market sell price (if the sum of the specified TS offset and the price of the best sell order is less than or equal to zero, the sell order is not placed and an error about the incorrectly specified TS offset is returned) – if TS is for buy
  • if a buy order is placed
    • checking sufficient funds in the currency market
      • if your own funds are not enough and there is no margin trading for this currency pair, then placing an order with a leverage is not activated and an error occurs about the lack of funds
      • if your own funds are insufficient and margin trading is enabled for this currency pair and a loan offer has been selected, the following checks are performed to be able to open a position:
        • checking for the existence of a loan offer
        • checking the match between the loan currency and the loan offer currency
        • checking available funds in the loan offer to open a position
        • verification of sufficiency of collateral for opening a position
        • validation of open position without immediately forced liquidation of funds
  • if a sell order is placed
    • checking sufficient funds in the traded currency
      • if your own funds are not enough and there is no margin trading for this currency pair, then placing an order with a leverage is not activated and an error occurs about the lack of funds
      • if your own funds are insufficient and margin trading is enabled for this currency pair and a loan offer has been selected, the following checks are performed to be able to open a position:
        • checking for the existence of a loan offer
        • checking the match between the loan currency and the loan offer currency
        • checking available funds in the loan offer to open a position
        • verification of sufficiency of collateral for opening a position
        • validation of open position without immediately forced liquidation of funds

If own funds was used:

As a result of this command, when passing all checks, funds are blocked for opening this order and a notification about the new balance is sent to the notification system, a corresponding buy/sell order is placed and, if necessary, the corresponding conditional orders SL, TP, TS are placed. Information about the orders placed is sent to the notification system. If conditional orders were placed together with the main order, then the orders are relinking and the matching function is activated.

If margin trading was used:

As a result of this command, when passing all the checks, the margin for opening a position is blocked, the required amount from the lender's loan offer is blocked and a notification about the new balance of both the lender and the borrower is sent to the notification system, the corresponding position is set. Conditional orders are not created in this case. The position and margin level are calculated. Information about the formed position is sent to the notification system and matching function is activated.

{"0":800,"1":<user_id>,"2":<market>,"3":<currency>,"4":<side>,"5":<base>,"6":<amount>,"7":<sl_rate>,"8":<tp_rate>,"9":<ts_offset>,"10":<offer_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <side> – order direction: 1 – sell order, 0 – buy order
  • <base> – a feature that determines the currency in which the amount is set. 0 – the amount specified in the <currency>, 1 – the amount specified in the <market>
  • <amount> – amount of <currency> to buy or sell
  • <sl_rate> – stop loss price (in case when the bought currency has gone down, and the best buy price in the order book has become less than or equal to the set price of stop loss, then the sell market order of all already bought currency in the main order is automatically placed to exclude even greater losses; in case when the sold currency has gone up, and the best sell price in the order book has become more or equal to the set price of stop loss, then the buy market order of all already sold currency in the main order is automatically placed to exclude even greater losses)
  • <tp_rate> – take profit price(in case when the bought currency has gone up, and the best buy price in the order book has become greater than or equal to the set price of take profit, then the sell market order of all already bought currency in the main order is automatically placed to fix the profit; in case when the sold currency has gone down, and the best sell price in the order book has become less or equal to the set price of take profit, then the buy market order of all already sold currency in the main order is automatically placed to fix the profit)
  • <ts_offset> – trailing stop price offset. For buy order, the price of the TS order is initially set to the value equal to the difference between the best buy price and the specified offset. For sell order, the price of the TS order is initially set to the value equal to the sum of the best selling price and the specified offset
  • <offer_id> – contains the value of the selected loan offer (when using margin trading). If the leverage was not used, it contains the value 0

In case when the bought currency has gone up, then the price of the TS sell order is pulled up by the difference between the best buy price in the order book and the specified offset; in case when the bought currency has gone down, the condition for triggering the TS order is checked (if the best buy price is less than or equal to the price of the TS order), and if the condition is met, then a sell market order of all bought currency in the main order is automatically placed.

In case when the sold currency has gone down, then the price of the TS buy order is pulled down by the sum of the specified offset and the best sell price in the order book; in case when the sold currency has gone up, the condition for triggering the TS order is checked (if the best sell price is greater than or equal to the price of the TS order), and if the condition is met, then a buy market order of all bought currency in the main order is automatically placed.

If the buy order was placed without leverage:

  • the available funds under the order is blocked
  • a new balance message is sent to the notification system
  • a buy order is placed
  • a message is sent about placing a buy order in the notification system
  • if the SL price has been set, a conditional sell order is placed and a message is sent about placing a conditional sell order
  • if the TP price has been set, a conditional sell order is placed and a message is sent about placing a conditional TP sell order
  • if a TS price offset has been set, a conditional sell order is placed and a message is sent about placing a conditional TS sell order
  • if necessary, the linking of conditional orders is performed
  • running matching procedure with active orders in the current order book

If the sell order was placed without leverage:

  • the available funds under the order is blocked
  • a new balance message is sent to the notification system
  • a sell order is placed
  • a message is sent about placing a sell order in the notification system
  • if the SL price has been set, a conditional buy order is placed and a message is sent about placing a conditional buy order
  • if the TP price has been set, a conditional buy order is placed and a message is sent about placing a conditional TP buy order
  • if a TS price offset has been set, a conditional buy order is placed and a message is sent about placing a conditional TS buy order
  • if necessary, the linking of conditional orders is performed
  • running matching procedure with active orders in the current order book

If a long/short position has been opened:

  • the margin funds under the opening position is blocked with x5 leverage
  • the available funds in the loan offer is blocked under the opening position
  • a message about the new balance of the trader and the lender is sent to the notification system
  • a buy/sell order is placed
  • a message about placing a buy/sell order is sent to the notification system
  • running matching procedure with active orders in the current order book

Cancel order

This command is sent to the trading core when the user cancels order.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check for positive ID of the order
  • check for the existence of an open order
  • check whether the order belongs to the user

If the limit order is cancelled:

  • if this order has not started to be executed
    • conditional orders SL, TP, TS are canceled, if any, and messages are sent about cancellation of conditional orders to the notification system
  • the order itself is canceled
  • the blocking of funds for this order is removed
  • a message about the order cancellation is sent to the notification system
  • a message about the user's new balance is sent to the notification system
  • if necessary, the following messages are also sent to the notification system:
    • the message about the new ticker
    • message about the new top bids
    • message about the new top asks
    • message about the new depth

If the conditional order is cancelled (SL, TP or TS):

  • cancels the specified conditional order
  • a message about cancellation of a conditional order is sent to the notification system
{"0":900,"1":<user_id>,"2":<market>,"3":<currency>,"4":<order_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <order_id> – cancelled order ID

Assignment of the fee to the user

This command is sent to the trading core by the system administrator to assign a fee for a certain user for a certain currency.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • checking the existence of an account in a given currency
  • checking the correctness of the percentage value
{"0":1000,"1":<user_id>,"2":<currency_code>,"3":<new_fee_percent>}

As a result of this command, the user is assigned a new amount of fee for the specified currency and a message about the new amount of fee is sent to the notification system.

Close position

This command is sent to the trading core when the position is closed by the user.

With this command, the following checks are performed on the trading core:

  • check for the existence of the user
  • check for positivity of position ID
  • checking for the existence of a position
  • check if the position belongs to the user
{"0":1100,"1":<user_id>,"2":<market>,"3":<currency>,"4":<position_id>,"5":<side>}
  • position_id – position ID
  • side – direction of the closed position: 0 – long position, 1 – short position

After passing all the checks, the following actions are performed:

  • if there is still an open order under the position, the order is deleted
  • the lender returns the sum of main borrowed funds plus fee for the use of borrowed funds
  • a message about the new balance of the creditor is sent to the notification system
  • the sum of used funds in the position and the fees for the use of borrowed funds less the trader`s margin are deducted from the borrower's available funds
  • if the order was executed or partially executed when placing a position, then the buy/sell order is placed for the amount of realized funds when placing the position. Then a message is sent to the notification system about placing a market order and closing position. When realizing this market order, these funds will replenish the trading account of the borrower.
  • in the same transaction, orders are matched in current order book if the order was executed or partially executed when placing a position

Accrual of fees on the position

This command is sent every day during the active period of the position to the trading core in order to charge the next fee on the loan and calculate the new margin parameters for this position.

With this command, the following checks are performed on the trading core:

  • check for positivity of position ID
  • checking for the existence of a position
{"0":1200,"1":<user_id>,"2":<market>,"3":<currency>,"4":<position_id>,"5":<side>}
  • position_id – position ID
  • side – direction of the closed position: 0 – long position, 1 – short position

After passing all the checks, the following actions are performed:

  • if the position has not expired, then the next day fees on the position is calculated and the margin parameters for it
  • if the position has expired, the position is forcibly closed. When a position is forcibly closed, the same actions are performed as when the user closes the position.

Collateral payment under position

This command is sent to the trading core when making a collateral payment under the position by the user. For example, if the margin level reaches a critical point (Margin Call).

With this command, the following checks are performed on the trading core:

  • check that the user exists
  • check for positivity of position ID
  • checking for the existence of a position
  • verification of the positive amount of replenishment
  • checking sufficient funds in the margin currency
{"0":1300,"1":<user_id>,"2":<market>,"3":<currency>,"4":<position_id>,"5":<side>,"6":<amount>}
  • position_id – position ID
  • side – direction of the closed position: 0 – long position, 1 – short position
  • amount – the amount of the collateral payment under the position

After passing all the checks, the following actions are performed:

  • margin increases for the payment amount
  • the amount of available funds on the trading account in the loan currency decreases
  • a message is sent to the notification system about the user's new balance
  • the margin parameters of the position are calculated taking into account the replenishment and a message about the new margin parameters is sent to the notification system

Determining the amount of the loan

This command is sent to the trading core to determine the required loan amount by the specified amount and the current market rate.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a order book
  • check for sufficient depth of the order book
{"0":1400,"1":<user_id>,"2":<currency>,"3":<market>,"4":<amount>}
  • amount – amount of expected open position

The required loan amount is returned to ensure the execution of the market order when opening a position

Information on the balance of the user

This command is sent to the trading core to get information on the balance of either a particular currency or all currencies.

With this command, the following checks are performed on the trading core:

  • check that the user exists
{"0":2400,"1":<user_id>,"2":<currency>}
  • currency – optional parameter (if not specified, we get information on all currencies)

The following data is returned: available funds, blocked funds in orders and the size of the fee.

Balance information and user margin parameters

This command is sent to the trading core to get information on the balance of all currencies as in Section 4.15 plus margin params: Margin Call Level, Force Liquidation Level, Leverage Level, Margin Call flag and Suspended flag.

With this command, the following checks are performed on the trading core:

  • check that the user exists
{"0":2500,"1":<user_id>}

Returns the following information: available funds, blocked funds, fee value for each currency, leverage value, MC level, FL level, MC flag, Suspend flag.

Information on the size of the user fee

This command is sent to the trading core for information on the size of the fee for a given currency and the user.

With this command, the following checks are performed on the trading core:

  • check that the user exists
  • check for the existence of the currency
{"0":2600,"1":<user_id>,"2":<currency>}

The following data is returned: the size of the fee on specified currency.

Information on active user orders

This command is sent to the trading core to obtain information on the user's active orders for a specific currency and market (currency pair).

With this command, the following checks are performed on the trading core:

  • check that the user exists
  • checking for the existence of a currency pair
{"0":2700,"1":<user_id>,"2":<market>,"3":<currency>}

Both regular orders and conditional orders (SL, TP, TS) are returned

Information on a specific order

This command is sent to the trading core to get information on a certain order.

With this command, the following checks are performed on the trading core:

  • check that the user exists
  • check for positive ID of the order
  • checking for the existence of an order
  • check whether the order belongs to the specified user
{"0":2800,"1":<user_id>,"2":<order_id>}

Currency, market currency, order direction and order information are returned.

Information on all open positions

This command is sent to the trading core to get information on all open positions for a given currency pair and to the user.

With this command, the following checks are performed on the trading core:

  • check that the user exists
  • checking for the existence of a currency pair
{"0":3000,"1":<user_id>,"2":<market>,"3":<currency>}

The list of long and short positions for this user is returned

Creating a currency pair

This command is sent by the administrator to the trading core to create a new currency pair.

With this command, the following checks are performed on the trading core:

  • verification of currency symbols in the void
  • checking the existence of a currency pair with the specified parameters
  • check for positivity amount_scale (number of decimal places for amount) and rate_scale (number of decimal places for price) params
{"0":5000,"1":<currency>,"2":<market>,"3":<amount_scale>,"4":<rate_scale>}
  • amount_scale – number of decimal places for amount
  • rate_scale – number of decimal places for price

During the creation, trading accounts for new currencies are opened for all users and a new order book for this currency pair is created.

Information on all currency pairs

This command is sent to the trading core to get a list of currency pairs, information about the suspension of trading on each currency pair and the status of margin trading on currency pairs

{"0":5100}

List of currencies in market

This command is sent to the trading core to get a list of traded currencies for a specific market.

{"0":5200}

Change the settings of the currency pair

This command is sent to the trading core by the administrator to change the significant decimal places for quantity and price.

With this command, the following checks are performed on the trading core:

  • verification of currency symbols in the void
  • checking for the existence of a currency pair
  • check for positivity amount_scale (number of decimal places for amount) and rate_scale (number of decimal places for price) params
{"0":5400,"1":<currency>,"2":<market>,"3":<amount_scale>,"4":<rate_scale>}
  • amount_scale – number of decimal places for amount
  • rate_scale – number of decimal places for price

The launch of margin trading for the currency pair

This command is sent to the trading core by the administrator to change the status of margin trading for a given currency pair.

With this command, the following checks are performed on the trading core:

  • verification of currency symbols in the void
  • checking for the existence of a currency pair
  • check whether margin trading on this currency pair has already been resumed
{"0":5500,"1":<currency>,"2":<market>}

Suspension of margin trading for a currency pair

This command is sent to the trading core by the administrator to change the status of margin trading for a given currency pair.

With this command, the following checks are performed on the trading core:

  • verification of currency symbols in the void
  • checking for the existence of a currency pair
  • check whether margin trading on this currency pair has already been suspended
{"0":5600,"1":<currency>,"2":<market>}

Add margin loan

This command is sent to the trading core in order to add an loan offer of both the trader and the exchange administrator.

With this command, the following checks are performed on the trading core:

  • user type verification (if the user is an administrator of the exchange, the addition of a loan offer occurs without further checks)
  • check for the existence of the user
  • checking the sufficiency of funds on the trading account
  • check the existence of the currency
{"0":5700,"1":<offer_id>,"2":<user_id>,"3":<funds>,"4":<currency>,"3":<percent>,"3":<period>}
  • offer_id – loan offer ID
  • funds – loan offer amount
  • percent – loan offer fee per day
  • period – maximum period of leverage

In the trading core, the specified amount of funds is debited from the user's trading account and a loan offer is formed with the specified parameters, and a message is generated to the notification system about the new balance of the user.

Delete margin loan

This command is sent to the trading core to remove the loan offer from the system.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a loan offer
  • verification of the current use of funds under this offer
  • checking the lender type of the loan offer
    • if the lender is an exchange, then this offer is definitely removed from the system
    • if the lender is a trader, then the existence of this user is checked
{"0":5710,"1":<user_id>,"2":<offer_id>}
  • offer_id – loan offer ID

In the trading core, the loan offer funds plus fees on the use of the loan is credited to the trading account of the lender, and a message is sent to the notification system about the new balance of the lender. After that, the loan offer is removed from the system.

Suspend margin loan

This command is sent to the trading core to change the status of the specified loan offer.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a loan offer
  • checking the lender type of the loan offer
    • if the lender is an exchange, then this offer is suspended
    • if the lender is a trader, the offer is verified as belonging to the specified user and if the user is the owner, the offer is suspended
{"0":5720,"1":<user_id>,"2":<offer_id>}
  • offer_id – loan offer ID

Resume margin loan

This command is sent to the trading core to change the status of the specified loan offer.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a loan offer
  • checking the lender type of the loan offer
    • if the lender is an exchange, then this offer is resumed
    • if the lender is a trader, the offer is verified as belonging to the specified user and if the user is the owner, the offer is resumed
{"0":5730,"1":<user_id>,"2":<offer_id>}
  • offer_id – loan offer ID

Transfer of fees by the loan offer to the creditor trading account

This command is sent to the trading core by the lender in order to transfer the earned funds (fees) to its own trading account.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a loan offer
  • check for the existence of the user
  • verification of the ownership of the specified user to this offer
  • verification of sufficiency of fees on offer (fees must be greater than or equal to specified <funds>)
{"0":5740,"1":<user_id>,"2":<offer_id>,"2":<funds>}
  • offer_id – loan offer ID
  • funds – amount of funds transferred

As a result of this command, fees is transferred to the creditor's trading account and a message about the new parameters of the offer and the new balance is sent to the notification system

Get a ticker by currency pair

This command is sent to the trading core to get a ticker for the currency pair.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a currency pair
{"0":7000,"1":<currency>,"2":<market>}

As a result of this command, best bid and best ask are returned (best bid price and best ask price)

Information on the depth of the market for a currency pair

This command is sent to the trading core to obtain the depth of the market for the currency pair, taking into account the specified limit on the number of orders.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a currency pair
  • check for the positivity of the limit
{"0":7100,"1":<currency>,"2":<market>,"3":<limit>}
  • limit – positive integer value

The following data is returned: the list of active buy orders with the specified limit (conditional orders SL, TP, TS are not included), the list of active sell orders with the specified limit (conditional orders SL, TP, TS are not included), the volume of buy orders in the market currency (total, despite the limit), the volume of sell orders in the market currency (total, despite the limit), the number of buy orders and the number of sell orders, the number of sell and buy currency (total, despite the limit)

Suspension of trading in a currency pair

This command is sent by the administrator to the trading core to suspend trading on a certain currency pair.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a currency pair
  • check the current status (is trading already suspended)
{"0":8800,"1":<currency>,"2":<market>}

Resumption of trading in currency pair

This command is sent by the administrator to the trading core to resume trading on a certain currency pair.

With this command, the following checks are performed on the trading core:

  • checking for the existence of a currency pair
  • check the current status (is trading already resumed)
{"0":8900,"1":<currency>,"2":<market>}

Creating a system snapshot

This command is sent by the administrator to the trading core to create a system snapshot of the current state of the trading core.

{"0":9000}

When this command is called, two files are created: ids.dat (contains the current incremental value of func_call_id, order_id, deal_id and position_id) and binary file core.bin (contains the current status of all serializable objects in the system)

Restoring the system from a snapshot

This command is sent by the administrator to the trading core to restore data from the snapshot.

{"0":9100}

When this command is called, two files are searched in the file system: ids.dat (contains the current incremental value of func_call_id, order_id, deal_id and position_id) and binary file core.bin (contains the current status of all serializable objects in the system) and system restores the state of the trading core, which was at the time of formation of these files.

Recovering of users balances of the trading core according to the database

This command is sent by the administrator to the trading core to restore user balances.

{"0":9300,"1":<user_id>,"2":<currency_code>,"3":<available>,"4":<blocked>,"5":<fee>}

Order recovery in the trading core according to the database

This command is sent by the administrator to the trading core to restore user order.

{"0":9400,"1":<user_id>,"2":<order_id>,"3":<currency_code>,"4":<market_currency_code>,"5":<side>,"6":<size>,"7":<actualSize>,"8":<price>,"9":<time_tick>}

Recovering of a conditional SL order in the trading core according to the database

This command is sent by the administrator to the trading core to restore user conditional SL order.

{"0":9410,"1":<user_id>,"2":<main_order_id>,"3":<order_id>,"4":<currency_code>,"5":<market_currency_code>,"6":<side>,"7":<size>,"8":<actualSize>,"9":<price>,"10":<time_tick>}

Recovering of a conditional TP order in the trading core according to the database

This command is sent by the administrator to the trading core to restore user conditional TP order.

{"0":9420,"1":<user_id>,"2":<main_order_id>,"3":<order_id>,"4":<currency_code>,"5":<market_currency_code>,"6":<side>,"7":<size>,"8":<actualSize>,"9":<price>,"10":<time_tick>}

Recovering of a conditional TS order in the trading core according to the database

This command is sent by the administrator to the trading core to restore user conditional TS order.

{"0":9430,"1":<user_id>,"2":<main_order_id>,"3":<order_id>,"4":<currency_code>,"5":<market_currency_code>,"6":<side>,"7":<size>,"8":<actualSize>,"9":<price>,"10":<time_tick>,"11":<ts_offset>}

Recovering of a margin loan in the trading core according to the database

This command is sent by the administrator to the trading core to restore loan offer.

{"0":9700,"1":<offer_id>,"2":<user_id>,"3":<currency_code>,"4":<available_funds>,"5":<blocked_funds>,"6":<fee_funds>,"7":<percent>,"8":<period>,"9":<active>,"10":<time_tick>}

Recovering of a margin position in the trading core according to the database

This command is sent by the administrator to the trading core to restore user position.

{"0":9440,"1":<market_currency_code>,"2":<currency_code>,"3":<position_id>,"4":<side>,"5":<main_order_id>,"6":<user_id>,"7":<offer_id>,"8":<original_amount>,"9":<actual_amount>,"10":<credited>,"11":<creditFee>,"12":<creditUsed>,"13":<marginPosition>,"14":<realized_volume>,"15":<blockedMarginFunds>,"16":<marginCall>,"17":<validUntilTicks>,"18":<time_tick>}

Recovering of a buffer data in the trading core

This command is sent by the administrator to the trading core to restore system buffer data.

{"0":9600}

Calculation of margin parameters by all positions

This command is not called by API, this command executed automatically whenever the buy/sell order is placed or cancelled and also when the position is closed (either automatically or by the initiative of the user)
During the execution of this command, the margin parameters of each position are updated (if necessary), and if the margin level for the position is less than or equal to 0.14, then the mechanism of margin call is ictivated (the need to make a collateral payment under position in order to avoid the force liquidation), and if the margin level becomes less than or equal to 0.07, then the mechanism of force liquidation is activated.
This command is also sent to the reserve trading core to execute the algorithms embedded in it.

Calculation of conditional orders for all order books

This command is not called by API, this command executed automatically whenever the best bid or best ask price is changed.
During the execution of this command, the conditional orders SL, TP and TS are checked and calculated in all order books. Conditional orders are triggered only if the following conditions are met:

  • if the volume of the conditional order is greater than zero
  • if the best buy/sell order has reached the set value of the conditional order
  • if the volume of accumulated orders in the order book covers the volume of the conditional order
  • if there are enough funds on the user's trade account to execute this conditional order

If the volume of accumulated orders in the order book does not allow to execute a conditional order, the system will wait for a sufficient volume.
If the volume of accumulated orders in the depth of market allows to execute a conditional order, but there are not enough funds on the user's account, then this conditional order is automatically canceled.
If all checks are passed, the system blocks funds for the execution of this order, sends a message about the new balance to the notification system, removes the conditional order from memory.
If in addition to this conditional order, other conditional orders have been placed, the system also removes them from memory and sends a message about the cancellation of these conditional orders to notification system, and also sends a message about the execution of the conditional order. A market order is created and sent to the order book for execution.
This command is also sent to the reserve trading core to execute the algorithms embedded in it.

Placement of a limit order by a market maker

This command is sent to the trading core when the market maker places a limit buy/sell order.

This command performs the same checks in the trading core as when placing a limit order via the web interface

{"0":700,"1":<user_id>,"2":<market>,"3":<currency>,"4":<side>,"5":<amount>,"6":<rate>,"7":<sl_rate>,"8":<tp_rate>,"9":<ts_offset>,"10":<offer_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <side> – order direction: 1 – sell order, 0 – buy order
  • <amount> – amount of <currency> to buy or sell
  • <rate> – buy or sell price in <market> currency
  • <sl_rate> – stop loss price (in case when the bought currency has gone down, and the best buy price in the order book has become less than or equal to the set price of stop loss, then the sell market order of all already bought currency in the main order is automatically placed to exclude even greater losses; in case when the sold currency has gone up, and the best sell price in the order book has become more or equal to the set price of stop loss, then the buy market order of all already sold currency in the main order is automatically placed to exclude even greater losses)
  • <tp_rate> – take profit price(in case when the bought currency has gone up, and the best buy price in the order book has become greater than or equal to the set price of take profit, then the sell market order of all already bought currency in the main order is automatically placed to fix the profit; in case when the sold currency has gone down, and the best sell price in the order book has become less or equal to the set price of take profit, then the buy market order of all already sold currency in the main order is automatically placed to fix the profit)
  • <ts_offset> – trailing stop price offset. For buy order, the price of the TS order is initially set to the value equal to the difference between the best buy price and the specified offset. For sell order, the price of the TS order is initially set to the value equal to the sum of the best selling price and the specified offset
  • <offer_id> – contains the value of the selected loan offer (when using margin trading). If the leverage was not used, it contains the value 0

In case when the bought currency has gone up, then the price of the TS sell order is pulled up by the difference between the best buy price in the order book and the specified offset; in case when the bought currency has gone down, the condition for triggering the TS order is checked (if the best buy price is less than or equal to the price of the TS order), and if the condition is met, then a sell market order of all bought currency in the main order is automatically placed.

In case when the sold currency has gone down, then the price of the TS buy order is pulled down by the sum of the specified offset and the best sell price in the order book; in case when the sold currency has gone up, the condition for triggering the TS order is checked (if the best sell price is greater than or equal to the price of the TS order), and if the condition is met, then a buy market order of all bought currency in the main order is automatically placed.

The same procedures are performed as when placing a limit order via the web interface

Placement of a market order by a market maker

This command is sent to the trading core when the market maker places a market buy/sell order.

This command performs the same checks in the trading core as when placing a market order via the web interface

{"0":800,"1":<user_id>,"2":<market>,"3":<currency>,"4":<side>,"5":<base>,"6":<amount>,"7":<sl_rate>,"8":<tp_rate>,"9":<ts_offset>,"10":<offer_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <side> – order direction: 1 – sell order, 0 – buy order
  • <base> – a feature that determines the currency in which the amount is set. 0 – the amount specified in the <currency>, 1 – the amount specified in the <market>
  • <amount> – amount of <currency> to buy or sell
  • <sl_rate> – stop loss price (in case when the bought currency has gone down, and the best buy price in the order book has become less than or equal to the set price of stop loss, then the sell market order of all already bought currency in the main order is automatically placed to exclude even greater losses; in case when the sold currency has gone up, and the best sell price in the order book has become more or equal to the set price of stop loss, then the buy market order of all already sold currency in the main order is automatically placed to exclude even greater losses)
  • <tp_rate> – take profit price(in case when the bought currency has gone up, and the best buy price in the order book has become greater than or equal to the set price of take profit, then the sell market order of all already bought currency in the main order is automatically placed to fix the profit; in case when the sold currency has gone down, and the best sell price in the order book has become less or equal to the set price of take profit, then the buy market order of all already sold currency in the main order is automatically placed to fix the profit)
  • <ts_offset> – trailing stop price offset. For buy order, the price of the TS order is initially set to the value equal to the difference between the best buy price and the specified offset. For sell order, the price of the TS order is initially set to the value equal to the sum of the best selling price and the specified offset
  • <offer_id> – contains the value of the selected loan offer (when using margin trading). If the leverage was not used, it contains the value 0

In case when the bought currency has gone up, then the price of the TS sell order is pulled up by the difference between the best buy price in the order book and the specified offset; in case when the bought currency has gone down, the condition for triggering the TS order is checked (if the best buy price is less than or equal to the price of the TS order), and if the condition is met, then a sell market order of all bought currency in the main order is automatically placed.

In case when the sold currency has gone down, then the price of the TS buy order is pulled down by the sum of the specified offset and the best sell price in the order book; in case when the sold currency has gone up, the condition for triggering the TS order is checked (if the best sell price is greater than or equal to the price of the TS order), and if the condition is met, then a buy market order of all bought currency in the main order is automatically placed.

The same procedures are performed as when placing a market order via the web interface

Cancel order by a market maker

This command is sent to the trading core when the market maker cancels order.

This command performs the same checks in the trading core as when cancelling order via the web interface

{"0":900,"1":<user_id>,"2":<market>,"3":<currency>,"4":<order_id>}
  • <user_id> – user ID,
  • <market> – market currency code, (for example: USDT, BTC)
  • <currency> – trading currency code, (for example: LTC, BCH, ETH)
  • <order_id> – cancelled order ID

The same procedures are performed as when cancelling order via the web interface