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
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

base_currency
string
quote_currency
string
side
string

BUY/SELL

user_id
string
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",
  • "base_currency": "USD",
  • "quote_currency": "TBTC",
  • "side": "BUY",
  • "user_id": "Y0ZuTVFCNnl6S3pISDhMTXVYSHBwZz09"
}
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": {
    }
}

get-quote/quotes

Returns quote_rate and related data for requested base_currency, quote_currency, side and amount.
The payload has to be valid: every request object has to include base_currency, quote_currency
side and base_amount query params. Every related query param to the request object
has to have the same index. If there is only one request object the indexes are not required.

SecurityAuthorization
Request
query Parameters
base_currency[0]
required
string

base_currency query param with 0 index

Example: base_currency[0]=USD
base_currency[1]
required
string

base_currency query param with 1 index

Example: base_currency[1]=GTETH
quote_currency[0]
required
string

quote_currency query param with 0 index

Example: quote_currency[0]=TBTC
quote_currency[1]
required
string

quote_currency query param with 1 index

Example: quote_currency[1]=USD
side[0]
required
string

side query param with 0 index

Example: side[0]=BUY
side[1]
required
string

side query param with 1 index

Example: side[1]=SELL
base_amount[0]
required
string

base_amount query param with 0 index

Example: base_amount[0]=10000
base_amount[1]
required
string

base_amount query param with 1 index

Example: base_amount[1]=2
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/quote
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)

base_currency
string
quote_currency
string
side
string
amount
number
Responses
200

Success

401

Unauthorized

422

Unprocessable Content

500

Internal Server Error

post/orders/quote
Request samples
application/json
{
  • "base_currency": "TBTC",
  • "quote_currency": "USD",
  • "side": "SELL",
  • "amount": 0.1
}
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": [ ]
}