Orders

This section give's control and information for all the orders performed by any user.
Order can be any Buy/Sell order (Market or Limit) with any currency.
Order must be created with a base amount,base currency,quote amount and quote currency,(and limit amount in case of limit orders).
Admin logged in - can see all the orders created by users.
User logged in - can see it's own orders data,create new orders (in case he has sufficent balance).

get-all-orders-list

Returns a list of all orders (open and closed)

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

get/orders
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-new-order

Create new order - must given quote id for market orders

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

quote_id
string

The quote id of the previous requested spend_currency/receive_currency for a specific amount

order_type
string

MARKET/LIMIT

order_amount
string

amount of the currency you want to sell/buy depending on a side

order_price
string

required if the order is LIMIT to set the prefer price of the quote_currency in quantity of 1

spend_currency
string
receive_currency
string
side
string

BUY/SELL

Responses
200

Success

401

Unauthorized

500

Internal Server Error

post/orders
Request samples
application/json
{
  • "quote_id": "b01vT1VyRC9XVGcrUk9nNnkzVlkybUZ2Ti93ZFdvdVhnUC8rTHd4ZGV1T2gvdDc0Z1J5eFlnPT0",
  • "order_type": "MARKET",
  • "order_amount": "10000",
  • "order_price": "1",
  • "spend_currency": "USD",
  • "receive_currency": "TBTC",
  • "side": "BUY"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-exact-order-info

Return information about given order_id from orders table

SecurityAuthorization
Request
path Parameters
order_id
required
string

order_id path parameter

Example: <order_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/orders/{order_id}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

update-exact-limit-order

Update specific order with given order_id. The order can be updated only if it a limit order

SecurityAuthorization
Request
path Parameters
order_id
required
string

order_id path parameter

Example: <order_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

order_type
string

LIMIT only

order_amount
string
order_price
string
base_currency
string
quote_currency
string
side
string
user_id
string
Responses
200

Success

401

Unauthorized

500

Internal Server Error

put/orders/{order_id}
Request samples
application/json
{
  • "order_type": "LIMIT",
  • "order_amount": "1",
  • "order_price": "1500",
  • "base_currency": "USD",
  • "quote_currency": "GTETH",
  • "side": "BUY",
  • "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

delete-exact-limit-order

Cancel a specific order by a given order_id
* Can only cancel pending LIMIT orders *

SecurityAuthorization
Request
path Parameters
order_id
required
string

order_id path parameter

Example: <order_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
204

No Content (Success)

401

Unauthorized

500

Internal Server Error

delete/orders/{order_id}
Response samples
application/json
{ }

get-open-orders-list

Returns a list of open orders

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

get/oders/open
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-frozen-orders-list-info

Return frozen orders list information from orders table

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

get/orders/frozen
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-lp-balances-info

Returns information about LP's balances and available balances per liquidity provider

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/orders/balance
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-closed-orders-list

Returns list of closed orders

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

get/orders/history
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-quote-for-new-order

Get a quote (price) for creating a new order.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

quote_id
string
spend_currency
string
receive_currency
string
order_price
string
spend_amount
string
side
string
Responses
200

Success

401

Unauthorized

422

Unprocessable Content

500

Internal Server Error

post/orders/quote
Request samples
application/json
{
  • "quote_id": "K1hQOGs4U3hJS0U9",
  • "spend_currency": "TBTC",
  • "receive_currency": "USD",
  • "order_price": 1,
  • "spend_amount": 0.2,
  • "side": "SELL"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-quotes

Get a quote/quotes for a single or batch spend_currency/receive_currency pairs to get a current prices.

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw(json)

Array
spend_currency
string
receive_currency
string
spend_amount
string
side
string
Responses
200

Success

401

Unauthorized

post/orders/quotes
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

refresh-status-of-all-live-orders

Refresh status of all existing orders that not in final status (PENDING orders)

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

500

Internal Server Error

post/orders/refreshStatus
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": [ ]
}