Skip to content
PLUSQO RESTful API for Traders - V1
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md

README.md

plusqo exchange platform

RESTful-API

PLUSQO RESTful API for Traders - V1 / [ Base URL: https://trading.plusqo.io/api/v1/ ]

Public API

Does not require the use of authentication methods and is available via GET requests. This API does not require authorization, and is accessible through the GET request. In general, the URL for accessing the API is as follows /api/v1/api_method/api_action?api_params where api_method – this API method that is accessed, api_action – the action to be performed and api_params – incoming request parameters.

Private API

Requires the use of an authorization and is available only by using a POST request and GET request. To access this API requires authentication and you must use POST methods. API keys can be obtained in your account once you have registered to be a trader in PLUSQO Trading Exchange.

Authorization
Authorization is done via sending two headers:

  1. key - The public key, that can be obtained from user’s account
  2. sign - POST data (param = val & param1 = val1 … & paramN = valN), signed by the secret key HMAC-SHA512, secret key is also obtained from user’s account

PHP example

    $api_url = "https://trading.plusqo.io/api/v1/trade/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('pair_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...

Public calls available for all without registration

1. GET  /currency/list (Get currencies list)

Parameter

Name Type Description Default value Available values
order_by string Field to order by currency_id iso, name, currency_id
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1

Sample call : https://trading.plusqo.io/api/v1/currency/list?order_by=name

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "currency_id": 1,
        "iso": "BTC",
        "name": "Bitcoin"
      }
    ]
  }
}

2. GET  /currency/info (Get currency by id)

Parameter

Name Type Description Default value Available values
currency_id integer Currency id to find (required)

Sample call : https://trading.plusqo.io/api/v1/currency/info/?currency_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "currency_id": 1,
      "iso": "BTC",
      "name": "Bitcoin"
    }
  }
}

3. GET  /trade/list (Get trade logs list)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
type string type to find buy, sell
date_from integer Timestamp to start -1 day
date_to integer Timestamp to end current timestamp
order_by string Field to order by (required) trade_id trade_id, pair_id, type, price, volume, fee, created
order_direction string Direction to order by (required) asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) (required) 100
page integer current page (required) 1

Sample call : https://trading.plusqo.io/api/v1/trade/list?pair_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "trade_id": 1,
        "pair_id": 1,
        "type": "buy",
        "price": 8200,
        "volume": 1,
        "created": 1529515521
      }
    ]
  }
}

4. GET  /trade/info (Get trade log by id)

Parameter

Name Type Description Default value Available values
trade_id integer Trade id to find (required)

Sample call : https://trading.plusqo.io/api/v1/trade/info/?trade_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "trade_id": 1,
      "pair_id": 1,
      "type": "buy",
      "price": 8200,
      "volume": 1,
      "created": 1529515521
    }
  }
}

5. GET  /pair/list (Get currency pairs list)

Parameter

Name Type Description Default value Available values
order_by string Field to order by pair_id pair_id, currency_id_from, currency_id_to
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1

Sample call : https://trading.plusqo.io/api/v1/pair/list

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "pair_id": 1,
        "currency_id_from": 1,
        "currency_id_to": 2,
        "filters": {
          "price": {
            "min": "0.00000010",
            "step": "0.00000010"
          },
          "amount": {
            "min": "0.00000010",
            "step": "0.00000010"
          }
        }
      }
    ]
  }
}

6. GET  /pair/info (Get currency pair by id)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id to find (required)

Sample call : https://trading.plusqo.io/api/v1/pair/info/?pair_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "pair_id": 1,
      "currency_id_from": 1,
      "currency_id_to": 2,
      "filters": {
        "price": {
          "min": "0.00000010",
          "step": "0.00000010"
        },
        "amount": {
          "min": "0.00000010",
          "step": "0.00000010"
        }
      }
    }
  }
}

7. GET  /stats/marketdepth (Get market depth stats dependant on trade logs)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
date_from integer Timestamp to start -1 month
date_to integer Timestamp to end current timestamp
order_by string Field to order by pair_id pair_id, min, max, avg, vol
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1

Sample call : https://trading.plusqo.io/api/v1/stats/marketdepth

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "pair_id": 1,
        "min": 1,
        "max": 100.234,
        "avg": 65.22452,
        "vol": 987.1
      }
    ]
  }
}

8. GET  /stats/marketdepthfull (Get market depth stats dependant on trade logs)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
date_from integer Timestamp to start -1 day
date_to integer Timestamp to end current timestamp
order_by string Field to order by pair_id pair_id, min, max, avg, vol
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1

Sample call : https://trading.plusqo.io/api/v1/stats/marketdepthfull

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "pair_id": 1,
      "pair_name": "BTC/EUR",
      "last_price": 8203.98,
      "min": 1,
      "max": 8330.23,
      "avg": 8208.22,
      "vol": 99887.1
    }
  }
}

9. GET  /stats/marketdepthbtcav (Get market depth stats dependant on trade logs)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
date_from integer Timestamp to start -1 day
date_to integer Timestamp to end current timestamp
order_by string Field to order by pair_id pair_id, min, max, avg, vol
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1

Sample call : https://trading.plusqo.io/api/v1/stats/marketdepthfull

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "pair_id": 1,
        "pair_name": "BTC/EUR",
        "last_price": 8203.98,
        "max_bid": 8200,
        "min_ask": 8210.23,
        "vol": 99887.1
      }
    ]
  }
}

10. GET  /orderbook/info (Get orderbook info)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id to find (required)
date_from integer Timestamp to start 0
date_to integer Timestamp to end current timestamp
type string type to find bid, ask

Sample call : https://trading.plusqo.io/api/v1/orderbook/info?pair_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entities": {
      "asks": [
        {
          "amount": 0.30837754,
          "price": 7473.89
        }
      ],
      "bids": [
        {
          "amount": 0.30837754,
          "price": 7473.89
        }
      ]
    }
  }
}

11. GET  /orderbook/ticker (Get orderbook ticker)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id to find

Sample call : https://trading.plusqo.io/api/v1/orderbook/ticker?pair_id=1

Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entities": [
      {
        "pair_id": 1,
        "pair_name": "BTC/EUR",
        "ask": {
          "price": 8700,
          "amount": 1
        },
        "bid": {
          "price": 8600,
          "amount": 2
        }
      }
    ]
  }
}

Private calls requiring obtaining API key pair

1. POST  /trade/list (Get trade logs list)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
type string type to find buy, sell
date_from integer Timestamp to start -1 day
date_to integer Timestamp to end current timestamp
order_by string Field to order by trade_id trade_id, pair_id, type, price, volume, fee, created
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/trade/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('pair_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "trade_id": 1,
        "pair_id": 1,
        "is_buyer": 0,
        "is_seller": 1,
        "type": "buy",
        "fee": 3,
        "price": 8200,
        "volume": 1,
        "created": 1529515521
      }
    ]
  }
}

2. POST  /trade/list/latest (Get the list of trades for the last 7 days)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id
type string type to find buy, sell
date_from integer Timestamp to start -1 day
date_to integer Timestamp to end current timestamp
order_by string Field to order by trade_id trade_id, pair_id, type, price, volume, fee, created
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/trade/list/latest";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('pair_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "trade_id": 1,
        "pair_id": 1,
        "is_buyer": 0,
        "is_seller": 1,
        "type": "buy",
        "fee": 3,
        "price": 8200,
        "volume": 1,
        "created": 1529515521
      }
    ]
  }
}

3. POST  /trade/info (Get trade log by id)

Parameter

Name Type Description Default value Available values
trade_id integer trade id to find (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/trade/info";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('trade_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "trade_id": 1,
      "pair_id": 1,
      "is_buyer": 0,
      "is_seller": 1,
      "type": "buy",
      "fee": 3,
      "price": 8200,
      "volume": 1,
      "created": 1529515521
    }
  }
}

4. POST  /balance/list (Get balances list)

Parameter

Name Type Description Default value Available values
order_by string Field to order by currency_id currency_id
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer Current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/balance/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "currency_id": 1,
        "balance": 18200,
        "address": "address-for-deposit"
      }
    ]
  }
}

5. POST  /balance/info (Get balance by currency id)

Parameter

Name Type Description Default value Available values
currency_id string Currency id to find balance (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/balance/info";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('currency_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "currency_id": 1,
      "balance": 18200,
      "address": "address-for-deposit"
    }
  }
}

6. POST  /transaction/list (Get transactions list)

Parameter

Name Type Description Default value Available values
date_from integer Timestamp to start -30 day
date_to integer Timestamp to end current timestamp
currency_id integer currency id to filter
type integer type to filter balance_deposit, balance_withdraw, order_create, order_cancel, order_buy, order_sell, order_refund, affiliate_payment, voucher_create, voucher_cancel, voucher_redeem, order_trade, payment_transaction
order_by string Field to order by transaction_id transaction_id, type, invoice_id, volume, system_commission, created
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/transaction/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('type' => 'order_trade', 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "transaction_id": 1,
        "pair_id": 1,
        "type": "order_trade",
        "invoice_id": 1,
        "volume": 100,
        "system_commission": 1,
        "created": 1529515521
      }
    ]
  }
}

7. POST  /transaction/info (Get transaction by id)

Parameter

Name Type Description Default value Available values
transaction_id integer transaction id to find (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/transaction/info";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('transaction_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "transaction_id": 1,
      "pair_id": 1,
      "type": "order_trade",
      "invoice_id": 1,
      "volume": 100,
      "system_commission": 1,
      "created": 1529515521
    }
  }
}

8. POST  /invoice/list (Get transaction requests list)

Parameter

Name Type Description Default value Available values
date_from integer Timestamp to start -30 day
date_to integer Timestamp to end current timestamp
currency_id integer currency id to filter
type integer type to filter balance_deposit, balance_withdraw, order_create, order_cancel, order_buy, order_sell, order_refund, affiliate_payment, voucher_create, voucher_cancel, voucher_redeem, order_trade, payment_transaction
order_by string Field to order by transaction_id transaction_id, type, invoice_id, volume, system_commission, created
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/invoice/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('type' => 'order_trade', 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "transaction_id": 1,
        "pair_id": 1,
        "type": "order_trade",
        "invoice_id": 1,
        "volume": 100,
        "system_commission": 1,
        "created": 1529515521
      }
    ]
  }
}

9. POST  /invoice/info (Get transaction request by id)

Parameter

Name Type Description Default value Available values
invoice_id integer transaction request id to find (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/invoice/info";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('invoice_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "invoice_id": 1,
      "currency_id": 1,
      "transaction_id": 1,
      "type": "deposit",
      "payment_type": "cryptopay",
      "amount": 100,
      "fee": 1,
      "created": 1529515521
    }
  }
}

10. POST  /order/list (Get orders list)

Parameter

Name Type Description Default value Available values
date_from integer Timestamp to start -30 day
date_to integer Timestamp to end current timestamp
pair_id integer currency pair id to filter
type integer type to filter buy, sell
order_by string Field to order by order_id order_id, pair_id, type, volume, price, fee, active, created
order_direction string Direction to order by asc asc, desc
items_per_page integer How many items to show per page (min: 1, max: 100) 100
page integer current page 1
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/order/list";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entities": [
      {
        "order_id": 1,
        "pair_id": 1,
        "type": "buy",
        "type_trade": "limit",
        "price": 8500,
        "price_stop": 0,
        "volume": 1,
        "volume_start": 2,
        "fee_percent": 1,
        "fee_percents": {
          "taker": "1.0000",
          "maker": "0.5000"
        },
        "created": 1529515521
      }
    ]
  }
}

11. POST  /order/info (Get order by id)

Parameter

Name Type Description Default value Available values
order_id integer order id to find (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/order/info";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('order_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": {
    "entity": {
      "order_id": 1,
      "pair_id": 1,
      "type": "buy",
      "type_trade": "limit",
      "price": 8500,
      "price_stop": 0,
      "volume": 1,
      "volume_start": 2,
      "fee_percent": 1,
      "fee_percents": {
        "taker": "1.0000",
        "maker": "0.5000"
      },
      "created": 1529515521
    }
  }
}

12. POST  /order/new (Create new order)

Parameter

Name Type Description Default value Available values
pair_id integer Currency pair id (required)
amount number amount to buy or sell (required)
price number Price of order, required if type_trade: 'limit', 'stop_limit', 'trailing_stop_limit' 0
price_stop number Price stop of order, required if type_trade: 'stop_limit, 'stop_market' 0
distance number Distance of order, required if type_trade: 'trailing_stop', 'trailing_stop_limit'
type string type of order (required) buy, sell
type_trade string type of order trade 'limit', 'market', 'stop_limit', 'stop_market', 'trailing_stop', 'trailing_stop_limit'
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/order/new";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('pair_id' => 1, 'amount' => 1, 'price' => 8500, 'type' => 'buy', 'type_trade' => 'limit', 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "pagination": {
    "current_page": 1,
    "items_per_page": 10,
    "total_items": 100,
    "total_pages": 10
  },
  "response": {
    "entity": {
      "order_id": 1,
      "pair_id": 1,
      "type": "buy",
      "type_trade": "limit",
      "price": 8500,
      "price_stop": 0,
      "volume": 1,
      "fee_percent": 1,
      "total": 1
    }
  }
}

13. POST  /order/cancel (Delete order by id)

Parameter

Name Type Description Default value Available values
order_id integer order id to find (required)
Sample call in PHP
    $api_url = "https://trading.plusqo.io/api/v1/order/cancel";
    $mt = explode(' ', microtime());
    $NONCE = $mt[1] . substr($mt[0], 2, 6);
    $data = array('order_id' => 1, 'nonce' => $NONCE);
    $post_data = http_build_query($data, '', '&');
    $sign = hash_hmac('sha512', $post_data, $privateKey);
    $headers = array("Key: $publicKey", "Sign: $sign");
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_URL, $api_url);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
    $result = curl_exec($ch);
    //handle with $result here...
	
Sample Response (application/json)
{
  "errors": {
    "field": "Error text for input named field"
  },
  "response": "ok"
}
You can’t perform that action at this time.