Public API

  • API address: https://api.orion.finance/v1/{method}
  • All endpoints return either a JSON object or array.
  • All time and timestamp related fields are in milliseconds.

/summary

Description Overview of market data for all tickers.
Request example https://api.orion.finance/v1/summary
Example of the result
{
    "LTC_BTC": {
        "base_id": 2,
        "quote_id": 1,
        "change": -1.2,
        "last_price": "0.00626208",
        "quote_volume": "863.77",
        "base_volume": "5.43",
        "high24": "0.00592876",
        "low24": "0.00557697",
        "lowestAsk": "0.00588276",
        "highestBid": "0.00571711",
        "isFrozen": "0"
    },
    ...
}

/asset

Description Information on cryptocurrencies available on the exchange.
Request example https://api.orion.finance/v1/asset
Example of the result
{
    "BTC": {
    	"name": "Bitcoin",
    	"unified_cryptoasset_id": 1,
    	"can_withdraw": "true",
    	"can_deposit": "true",
    	"min_withdraw": "0.002",
    	"max_withdraw": "2",
    	"maker_fee": "0.01",
    	"taker_fee": "0.01"
    },
    ...
}

/ticker

Description Information on trading pairs available on the exchange.
Request example https://api.orion.finance/v1/ticker
Example of the result
{
    "LTC_BTC": {
    	"base_id": 2,
    	"quote_id": 1,
    	"last_price": "0.00626208",
    	"quote_volume": "863.77",
    	"base_volume": "5.43",
    	"isFrozen": "0"
    },
	...
}

/orderbook

Description Getting a list of orders for the specified pair.
Request example https://api.orion.finance/v1/orderbook?pair=LTC_BTC&count=10
Get parameters pair - Pair from /ticker list. Example: LTC_BTC. Mandatory parameter.
count - The number of records from 1 to 50. Default is 10. Optional parameter.
Example of the result
{
    "timestamp": 1572787263000,
    "bids":
    [
	["0.00626208","145.62452247"],
	["0.00626208","145.62452247"],
	...
    ],
    "asks":
    [
	["0.00630881","1.11440000"],
	["0.00631127","1.70580000"],
	...
    ]
}

/trades

Description Getting a list of trades for the specified pair.
Request example https://api.orion.finance/v1/trades?pair=LTC_BTC&count=10
Get parameters pair - Pair from /ticker list. Example: LTC_BTC. Mandatory parameter.
count - The number of records from 1 to 50. Default is 10. Optional parameter.
Example of the result
{
    {
	"tradeID": 5658074,
	"price": "0.00626208",
	"base_volume": "1.02927735",
	"quote_volume": "0.00644542",
	"trade_timestamp": 1572786670687,
	"type": "buy"
    },
    ...
}

Private API

With a private API you have access to make operations in your personal account. For using private API you must generate a private key on the user API page.
API address : https://api.orion.finance/v1/{method}
All private API requests must contain the Key and Sign headers.
Key - Your API Key
Sign - POST-request data signed by the "secret" of your key in accordance with the HMAC-SHA512 method.

In addition, all requests must include the POST parameter “nonce”. The nonce parameter is an integer that must always be bigger than the previously used one-time number and should not be incremented by one. Using an era in milliseconds is an easy choice, but be careful with time synchronization if you use the same API key on multiple servers.
All requests return the result in JSON format like this:
{
    "status": "success",
    "data": ...
}
If the status is error then in data there will be an error text, if the status is success then in data there will be requested data.

Example of request, bash:
echo -n "nonce=154264078397400" | \
openssl sha512 -hmac $API_SECRET

curl -X POST \
     -d "nonce=154264078397400" \
     -H "Key: 3f85a175e992ebc02f582a5f26d00b28" \
     -H "Sign: b927b88a99a08ca...f606cc3d6d429f1" \
     https://api.orion.finance/v1/get_balance
Example of request, PHP:
<?php
const API_KEY 'Your API key';
const 
API_SECRET 'Your API secret';
$data = [
    
'currency' => 'BTC'
];
$res orion_api('get_refill_addr'$data);
var_dump($res);

function 
orion_api($method$data) {
    if(empty(
$data['nonce'])) {
        
$data['nonce'] = microtime(true) * 1000;
    }
    
$data http_build_query($data);
    
$sign hash_hmac('sha256'$dataAPI_SECRET);

    
$cl curl_init'https://api.orion.finance/v1/' $method );
    
curl_setopt($clCURLOPT_RETURNTRANSFER,true);
    
curl_setopt($clCURLOPT_HEADER0);
    
curl_setopt($clCURLOPT_TIMEOUT5);
    
curl_setopt($clCURLOPT_FOLLOWLOCATIONtrue);
    
curl_setopt($clCURLOPT_SSL_VERIFYPEER0); 
    
curl_setopt($clCURLOPT_SSL_VERIFYHOST0);
    
curl_setopt($clCURLINFO_HEADER_OUTtrue);
    
curl_setopt($clCURLOPT_HTTPHEADER, ["Key: " API_KEY"Sign: $sign"]);
    
curl_setopt($clCURLOPT_POST1); 
    
curl_setopt($clCURLOPT_POSTFIELDS$data);

    
$ex curl_exec($cl);
    
curl_close($cl);
    return 
json_decode($ex) ?: $ex;
}

/get_balance

Description Getting a list of a general list of balances or in the specified currency. This method requires balance permission.
POST parameters currency - Currency from the /asset list. If not specified, the request will return a list of all currencies.
Example of the result
{
    "status": "success",
    "data": {
        "BTC": {
            "balance": "0",
            "on_orders": "0"
        },
        ...
    }
}

/get_refill_addr

Description Getting an address for refill balance.
POST parameters currency - Currency from the /asset list. You can specify a comma separated list, for example: BTC,LTC,ETH.
Example of the result
{
    "status": "success",
    "data": {
        "BTC": "31iTFYkfhK2cqaUToEicKtsZ9yBkkEC511",
        ...
    }
}

/get_withdrawals

Description Getting a list of withdrawals. This method requires withdraw permission.
POST parameters count - The number of records from 1 to 100. Default is 10. Optional parameter.
start - From which record will start the selection. Default is 0. Optional parameter.
Example of the result
{
    "status": "success",
    "data": [
        {
            "status": "wait",
            "sum": "0.00200000",
            "transaction_id": null,
            "currency": "BTC",
            "date": 1572721529,
            "address": "..."
        },
        ...
    ]
}

/withdraw

Description Withdraw funds. This method requires withdraw permission.
POST parameters currency - Currency from the /asset list. Mandatory parameter.
address - The address for withdrawal of funds. Mandatory parameter.
sum - Withdrawal amount. Mandatory parameter.
dest - Parameter "destination". Used for XRP currency only. Optional parameter.
Example of the result
{
    "status": "success",
    "data": "Withdraw success"
}

/get_open_orders

Description Getting a list of open orders. This method requires trading permission.
POST parameters pair - Pair from /ticker list, к примеру LTC_BTC. Optional parameter.
count - The number of records from 1 to 100. Default is 10. Optional parameter.
start - From which record will start the selection. Default is 0. Optional parameter.
Example of the result
{
    "status": "success",
    "data": [
    	{
            "id": 5181294,
            "pair": "LTC/BTC",
            "type": "buy",
            "amount": "0.10000000",
            "total_amount": "0.10000000",
            "price": "0.00010000",
            "date": 1572784393
    	},
    	...
    ]
}

/get_orders

Description Getting a list of all orders. This method requires trading permission.
POST parameters pair - Pair from /ticker list, к примеру LTC_BTC. Optional parameter.
count - The number of records from 1 to 100. Default is 10. Optional parameter.
start - From which record will start the selection. Default is 0. Optional parameter.
Example of the result
{
    "status": "success",
    "data": [
    	{
            "id": 5181294,
            "pair": "LTC/BTC",
            "type": "buy",
            "amount": "0.10000000",
            "total_amount": "0.10000000",
            "price": "0.00010000",
            "date": 1572784393
    	},
    	...
    ]
}

/get_order_status

Description Getting the status of one specified order. This method requires trading permission.
POST parameters order_id - Order ID. Mandatory parameter.
Example of the result
{
    "status": "success",
    "data": {
    	"id": 5181294,
    	"status": "open"
    }
}

/create_order

Description Creation of an order. This method requires trading permission.
POST parameters type - Order type "buy" or "sell". Mandatory parameter.
pair - Pair from /ticker list, for example LTC_BTC. Mandatory parameter.
amount - Amount of currency. Mandatory parameter.
price - Buy/Sell price. Mandatory parameter.
Example of the result
{
    "status": "success",
    "order_id": 5181294
}

/cancel_order

Description Cancellation of an order. This method requires trading permission.
POST parameters order_id - Order ID. Mandatory parameter.
Example of the result
{
    "status": "success",
    "data": "Order canceled"
}