API URL: https://payeer.com/api/trade/
- Connection test [/time]
- Pairs and limits [/info]
- Price statistics [/ticker]
- Orders [/orders]
- Trades [/trades]
- Balance [/account]
- New order [/order_create]
- Order status [/order_status]
- Cancel order [/order_cancel]
- Cancel orders [/orders_cancel]
- My orders [/my_orders]
- My history [/my_history]
- My trades [/my_trades]
API Settings: https://payeer.com/en/account/api/?tab=trade
To access the Private API, you should pass the following keys in the headers:
- API-ID - ID of API-user
- API-SIGN - signature of request
Also in the request body, the required parameter is ts
, the value of which is equal to the current timestamp in milliseconds.
The request will be processed if it reaches our server within 60 seconds to avoid significant network delays.
The maximum difference between the ts
parameter and the real time should not exceed 1 second, do not forget to set up time synchronization on your server.
The request body is passed as a json string.
Signature generation:
PHP
$msec = round(microtime(true) * 1000);
$method = 'account';
$req = json_encode(array(
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
apiSecret
- the secret key of the API user.
The signature is created using the HMAC-SHA256 method.
Python
import hashlib
import hmac
import time
import json
from urllib2 import Request, urlopen
ts = int(round(time.time()*1000))
method = 'account'
req = json.dumps({
'ts': ts,
})
print req
H = hmac.new('api_secret_key', digestmod=hashlib.sha256)
H.update(method + req)
sign = H.hexdigest()
print sign
headers = {
'Content-Type': 'application/json',
'API-ID': 'bd443f00-092c-4436-92a4-a704ef679e24',
'API-SIGN': sign
}
request = Request('https://payeer.com/api/trade/' + method, data=req, headers=headers)
response_body = urlopen(request).read()
print response_body
Node.js
var crypto = require('crypto')
request = require('request');
apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
apiSecret = 'api_secret_key';
method = 'account';
ts = Math.floor(new Date().getTime());
req = JSON.stringify({
'ts': ts,
});
sign = crypto.createHmac('sha256', apiSecret).update(method+req).digest('hex');
request({
method: 'POST',
url: 'https://payeer.com/api/trade/' + method,
headers: {
'Content-Type': 'application/json',
'API-ID': apiId,
'API-SIGN': sign
},
body: req
}, function (error, response, body) {
console.log(body);
});
List of possible errors.
Error | Description |
---|---|
INVALID_SIGNATURE |
Reasons: - invalid signature API-SIGN - invalid API-ID - API user is blocked (can be unblocked in settings) |
INVALID_IP_ADDRESS | The IP address ip of the request source does not match the one specified in the API settings |
LIMIT_EXCEEDED | Exceeding the limits (number of requests/weights/orders), more details are specified in the desc parameter |
INVALID_TIMESTAMP |
the ts parameter is invalid:- the request went to the API server for more than 60 seconds - wrong time on your server, set up synchronization |
ACCESS_DENIED | Access to the API/order is prohibited. Check the order_id |
INVALID_PARAMETER | parameter parameter is invalid |
PARAMETER_EMPTY | parameter parameter must be filled |
INVALID_STATUS_FOR_REFUND | the status status of the order does not allow to make a refund (the order has already been returned or canceled) |
REFUND_LIMIT | the order can be canceled at least 1 minute after creation |
UNKNOWN_ERROR | Unknown error on the exchange. Trading suspended for review. Try again in 15 minutes. |
INVALID_DATE_RANGE | Invalid date range for filtering (period must not exceed 32 days) |
INSUFFICIENT_FUNDS | insufficient funds to create an order (max_amount , max_value ) |
INSUFFICIENT_VOLUME | not enough volume to create an order (max_amount , max_value ) |
INCORRECT_PRICE | the price is out of range (min_price , max_price ) |
MIN_AMOUNT | quantity less than the minimum min_amount for the pair |
MIN_VALUE | value is less than the minimum min_value for the pair |
Checking the connection, getting the server time.
Request Weight: 1
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
time | server timestamp | 1644322909335 |
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/time");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
- Response 200 (application/json)
{
"success": true,
"time": 1644322909335
}
Getting limits, available pairs and their parameters.
Request Weight: 1
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
limits |
list of limits:requests weights orders
|
|
interval | interval | min, hour, day |
interval_num |
the value of the interval: min, 1: in one minute min, 5: in 5 minutes hour, 1: in 1 hour |
1 |
limit |
limit:requests , min 1, 600: 600 requests per minuteweights , min 1, 600: 600 weights per minuteorders , min 1, 120: 120 orders per minute
|
600 |
pairs | list of pairs | |
price_prec | precision price parameter |
2 |
min_price | minimum price for creating an order | 4375.74 |
max_price | maximum price for creating an order | 83139.00 |
min_amount | minimum amount to create an order | 0.0001 |
min_value | minimum value to create an order | 0.5 |
fee_maker_percent | maker's commission | 0.01 |
fee_taker_percent | taker's commission | 0.095 |
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/info");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Response 200 (application/json)
- Body
{
"success": true,
"limits": {
"requests": [
{
"interval": "min",
"interval_num": 1,
"limit": 600
}
]
},
"pairs": {
"BTC_USD": {
"price_prec": 2,
"min_price": "4375.74",
"max_price": "83139.00",
"min_amount": 0.0001,
"min_value": 0.5,
"fee_maker_percent": 0.01,
"fee_taker_percent": 0.095
},
"BTC_RUB": {
"price_prec": 2,
"min_price": "326269.32",
"max_price": "6199117.08",
"min_amount": 0.0001,
"min_value": 20,
"fee_maker_percent": 0.01,
"fee_taker_percent": 0.095
},
"BTC_EUR": {
"price_prec": 2,
"min_price": "3798.60",
"max_price": "72173.39",
"min_amount": 0.0001,
"min_value": 0.5,
"fee_maker_percent": 0.01,
"fee_taker_percent": 0.095
}
}
}
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/info");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
- Body
{
"pair": "BTC_USD,BTC_RUB"
}
-
Response 200 (application/json)
- Body
{
"success": true,
"limits": {
"requests": [
{
"interval": "min",
"interval_num": 1,
"limit": 600
}
]
},
"pairs": {
"BTC_USD": {
"price_prec": 2,
"min_price": "4332.68",
"max_price": "82321.00",
"min_amount": 0.0001,
"min_value": 0.5,
"fee_maker_percent": 0.01,
"fee_taker_percent": 0.095
},
"BTC_RUB": {
"price_prec": 2,
"min_price": "326269.32",
"max_price": "6199117.08",
"min_amount": 0.0001,
"min_value": 20,
"fee_maker_percent": 0.01,
"fee_taker_percent": 0.095
}
}
}
Getting price statistics and their changes over the last 24 hours.
Request Weight: 1
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
pairs | list of pairs | |
ask | ask price | 43790.00 |
bid | bid price | 43502.00 |
last | last price | 43501.00 |
min24 | minimum price for 24 hours | 43006.01 |
max24 | maximum price for 24 hours | 46000.00 |
delta | price change in 24 hours as a percentage | 0.70 |
delta_price | price change in 24 hours | 301.00 |
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/ticker");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Response 200 (application/json)
- Body
{
"success": true,
"pairs": {
"BTC_USD": {
"ask": "43555.55",
"bid": "43506.01",
"last": "43555.55",
"min24": "43006.01",
"max24": "46000.00",
"delta": "1.06",
"delta_price": "455.55"
},
"BTC_RUB": {
"ask": "3258999.99",
"bid": "3230001.02",
"last": "3230001.00",
"min24": "3175000.00",
"max24": "3390000.00",
"delta": "1.41",
"delta_price": "45000.97"
},
"BTC_EUR": {
"ask": "40000.00",
"bid": "39000.00",
"last": "40100.00",
"min24": "37560.00",
"max24": "40100.00",
"delta": "6.79",
"delta_price": "2549.00"
}
}
}
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/ticker");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
- Body
{
"pair": "BTC_USD,BTC_RUB"
}
-
Response 200 (application/json)
- Body
{
"success": true,
"pairs": {
"BTC_USD": {
"ask": "43790.00",
"bid": "43502.00",
"last": "43501.00",
"min24": "43006.01",
"max24": "46000.00",
"delta": "0.70",
"delta_price": "301.00"
},
"BTC_RUB": {
"ask": "3255999.99",
"bid": "3238600.00",
"last": "3230001.02",
"min24": "3175000.00",
"max24": "3390000.00",
"delta": "1.57",
"delta_price": "50001.02"
}
}
}
Getting available orders for the specified pairs.
Request Weight: 1 * count of pairs
Request Parameters
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
pairs | list of pairs | |
ask | ask price | 43790.00 |
bid | bid price | 43520.00 |
asks | list of sell orders | |
price | price | 43790.00 |
amount | amount | 0.00031422 |
value | value | 13.76 |
bids | list of buy orders | |
price | price | 43520.00 |
amount | amount | 0.00034788 |
value | value | 15.13 |
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/orders");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
- Body
{
"pair": "BTC_USD,BTC_RUB"
}
-
Response 200 (application/json)
- Body
{
"success": true,
"pairs": {
"BTC_USD": {
"ask": "43790.00",
"bid": "43520.00",
"asks": [
{
"price": "43790.00",
"amount": "0.00031422",
"value": "13.76"
},
{
"price": "43800.00",
"amount": "0.00125530",
"value": "54.99"
}
],
"bids": [
{
"price": "43520.00",
"amount": "0.00034788",
"value": "15.13"
},
{
"price": "43502.00",
"amount": "0.04065736",
"value": "1768.67"
}
]
},
"BTC_RUB": {
"ask": "3255999.99",
"bid": "3238600.00",
"asks": [
{
"price": "3255999.99",
"amount": "0.00010000",
"value": "325.60"
}
],
"bids": [
{
"price": "3238600.00",
"amount": "0.00022212",
"value": "719.35"
},
{
"price": "3230001.02",
"amount": "0.00083607",
"value": "2700.50"
}
]
}
}
}
Getting the history of transactions for the specified pairs.
Request Weight: 1 * count of pairs
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
pairs | list of pairs | |
id | id | 14162760 |
date | timestamp | 1644327656 |
type | action | buy, sell |
amount | amount | 0.00031422 |
price | price | 43790.00 |
value | value | 13.76 |
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/trades");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
)));
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
- Body
{
"pair": "BTC_USD,BTC_RUB"
}
-
Response 200 (application/json)
- Body
{
"success": true,
"pairs": {
"BTC_USD": [
{
"id": "14162760",
"date": 1644327656,
"type": "buy",
"amount": "0.00060372",
"price": "44299.99",
"value": "26.75"
},
{
"id": "14162734",
"date": 1644327545,
"type": "sell",
"amount": "0.00000119",
"price": "44399.98",
"value": "0.06"
}
],
"BTC_RUB": [
{
"id": "14162750",
"date": 1644327611,
"type": "buy",
"amount": "0.01152539",
"price": "3230100.00",
"value": "37228.16"
},
{
"id": "14162749",
"date": 1644327610,
"type": "buy",
"amount": "0.00988444",
"price": "3230100.00",
"value": "31927.73"
}
]
}
}
Getting the user's balance.
Request Weight: 10
Request Parameters:
Parameter | Description | Example |
---|---|---|
ts | timestamp in milliseconds | 1644327967240 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
balances | list of user's currencies | |
total | total balance | 1598.99 |
available | available balance | 1548.99 |
hold | frozen balance | 50 |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'account';
$req = json_encode(array(
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
Python
import hashlib
import hmac
import time
import json
from urllib2 import Request, urlopen
ts = int(round(time.time()*1000))
method = 'account'
req = json.dumps({
'ts': ts,
})
print req
H = hmac.new('api_secret_key', digestmod=hashlib.sha256)
H.update(method + req)
sign = H.hexdigest()
print sign
headers = {
'Content-Type': 'application/json',
'API-ID': 'bd443f00-092c-4436-92a4-a704ef679e24',
'API-SIGN': sign
}
request = Request('https://payeer.com/api/trade/' + method, data=req, headers=headers)
response_body = urlopen(request).read()
print response_body
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"ts": 1644327967240
}
-
Response 200 (application/json)
- Body
{
"success": true,
"balances": {
"USD": {
"total": 0.92,
"available": 0.92,
"hold": 0
},
"RUB": {
"total": 1598.99,
"available": 1548.99,
"hold": 50
},
"EUR": {
"total": 2.97,
"available": 0,
"hold": 2.97
},
"BTC": {
"total": 0,
"available": 0,
"hold": 0
},
"ETH": {
"total": 0,
"available": 0,
"hold": 0
},
"BCH": {
"total": 0,
"available": 0,
"hold": 0
},
"LTC": {
"total": 0,
"available": 0,
"hold": 0
},
"DASH": {
"total": 0,
"available": 0,
"hold": 0
},
"USDT": {
"total": 3,
"available": 0,
"hold": 3
},
"XRP": {
"total": 0.9981,
"available": 0.9981,
"hold": 0
},
"DOGE": {
"total": 94.55549964,
"available": 94.55549964,
"hold": 0
},
"TRX": {
"total": 223.681806,
"available": 208.681806,
"hold": 15
}
}
}
Creating an order of supported types: limit, market, stop limit.
Request Weight: 5 (10 for a market order)
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
order_id | id of the created order | 37057767 |
params | parameters of the created order | |
pair | pair | TRX_USD |
type | order type | limit, market, stop_limit |
action | action | buy, sell |
amount | amount | 10.000000 |
price | price | 0.08000 |
value | value | 0.80 |
stop_price | stop price | 0.07800 |
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | pair | TRX_USD |
type | order type | limit |
action | action | buy, sell |
amount | amount | 10 |
price | price | 0.08 |
ts | timestamp in milliseconds | 1644488888211 |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'order_create';
$req = json_encode(array(
'pair' => 'TRX_USD',
'type' => 'limit',
'action' => 'buy',
'amount' => '10',
'price' => '0.08',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "TRX_USD",
"type": "limit",
"action": "buy",
"amount": "10",
"price": "0.08",
"ts": 1644488888211
}
-
Response 200 (application/json)
- Body
{
"success": true,
"order_id": 37054386,
"params": {
"pair": "TRX_USD",
"type": "limit",
"action": "buy",
"amount": "10.000000",
"price": "0.08000",
"value": "0.80"
}
}
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | pair | TRX_USD |
type | order type | market |
action | action | buy, sell |
* amount | amount | 10 |
* value | value | 10000 |
ts | timestamp in milliseconds | 1644489441948 |
* - it is possible to specify one of two parameters for creating a market order (amount
or value
)
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'order_create';
$req = json_encode(array(
'pair' => 'TRX_USD',
'type' => 'market',
'action' => 'buy',
'amount' => '10',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN:f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "TRX_USD",
"type": "market",
"action": "buy",
"amount": "10",
"ts": 1644489441948
}
-
Response 200 (application/json)
- Body
{
"success": true,
"order_id": 37054922,
"params": {
"pair": "TRX_USD",
"type": "market",
"action": "buy",
"amount": "10.000000",
"price": "0.07200",
"value": "0.72"
}
}
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | pair | TRX_USD |
type | order type | stop_limit |
action | action | buy, sell |
amount | amount | 10 |
price | price | 0.08 |
stop_price | stop price | 0.078 |
ts | timestamp in milliseconds | 1644492621264 |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'order_create';
$req = json_encode(array(
'pair' => 'TRX_USD',
'type' => 'stop_limit',
'action' => 'buy',
'amount' => '10',
'price' => '0.08',
'stop_price' => '0.078',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "TRX_USD",
"type": "stop_limit",
"action": "buy",
"amount": "10",
"price": "0.08",
"stop_price": "0.078",
"ts": 1644492621264
}
-
Response 200 (application/json)
- Body
{
"success": true,
"order_id": 37057767,
"params": {
"pair": "TRX_USD",
"type": "stop_limit",
"action": "buy",
"amount": "10.000000",
"price": "0.08000",
"value": "0.80",
"stop_price": "0.07800"
}
}
Getting detailed information about your order by id.
Request Weight: 5
Request Parameters:
Parameter | Description | Example |
---|---|---|
order_id | order id | 37054293 |
ts | timestamp in milliseconds | 1644493185157 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
order | order parameters | |
id | order id | 37054293 |
date | timestamp of order creation | 1644488809 |
pair | pair | TRX_USD |
action | action | buy, sell |
type | order type | limit, market, stop_limit |
status | order status | success, processing, waiting, canceled |
amount | amount | 10.000000 |
price | price | 0.08000 |
stop_price | stop price | 0.08000 |
value | value | 0.80 |
amount_processed | processed amount | 10.000000 |
amount_remaining | remaining amount | 0.000000 |
value_processed | processed value | 0.72 |
value_remaining | remaining value | 0.08 |
api | mark of order creation via API | true, false |
avg_price | average price | 0.07200 |
trades | list of trades | |
id | trade id | 14190472 |
date | timestamp | 1644488809 |
status | status | success, processing |
price | price | 0.07150 |
amount | amount | 0.054165 |
value | value | 0.01 |
is_maker | you are the maker | true, false |
is_taker | you are the taker | true, false |
m_transaction_id | maker's transaction id | 1598693542 |
m_fee | maker's commission | 0.03 |
t_transaction_id | taker's transaction id | 1598693543 |
t_fee | taker's commission | 0.36 |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'order_status';
$req = json_encode(array(
'order_id' => '37054293',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"order_id": "37054293",
"ts": 1644493185157
}
-
Response 200 (application/json)
- Body
{
"success": true,
"order": {
"id": "37054293",
"date": 1644488809,
"pair": "TRX_USD",
"action": "buy",
"type": "limit",
"status": "success",
"amount": "10.000000",
"price": "0.08000",
"value": "0.80",
"amount_processed": "10.000000",
"amount_remaining": "0.000000",
"value_processed": "0.72",
"value_remaining": "0.08",
"avg_price": "0.07200",
"trades": {
"14190472": {
"id": "14190472",
"date": 1644488809,
"status": "success",
"price": "0.07150",
"amount": "0.054165",
"value": "0.01",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1598693542"
},
"14190473": {
"id": "14190473",
"date": 1644488809,
"status": "success",
"price": "0.07165",
"amount": "7.117935",
"value": "0.51",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1598693549"
},
"14190474": {
"id": "14190474",
"date": 1644488809,
"status": "success",
"price": "0.07200",
"amount": "2.827900",
"value": "0.20",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1598693554"
}
}
}
}
Cancellation of your order by id.
Request Weight: 10
Request Parameters:
Parameter | Description | Example |
---|---|---|
order_id | order id | 36942337 |
ts | timestamp in milliseconds | 1644330189737 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'order_cancel';
$req = json_encode(array(
'order_id' => '36942337',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"order_id": "36942337",
"ts": 1644330189737
}
-
Response 200 (application/json)
- Body
{
"success": true
}
Cancellation all/partially of orders.
Request Weight: 300
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs to cancel orders | TRX_RUB,DOGE_RUB |
action | action | buy, sell |
ts | timestamp in milliseconds | 1644330189737 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
items | list of cancelled orders |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'orders_cancel';
$req = json_encode(array(
'pair' => 'TRX_RUB,DOGE_RUB',
'action' => 'buy',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "TRX_RUB,DOGE_RUB",
"action": "buy",
"ts": 1644389071011
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": [
"36987301",
"36987294"
]
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'orders_cancel';
$req = json_encode(array(
'pair' => 'TRX_RUB,DOGE_RUB',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "TRX_RUB,DOGE_RUB",
"ts": 1644389254696
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": [
"36987703",
"36987698"
]
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'orders_cancel';
$req = json_encode(array(
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"ts": 1644388528500
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": [
"36987021",
"36987015"
]
}
Getting your open orders with the ability to filtering.
Request Weight: 60
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,TRX_USD |
action | action | buy, sell |
ts | timestamp in milliseconds | 1644396742116 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
items | list of orders | |
id | order id | 36989287 |
date | timestamp of order creation | 1644391218 |
pair | pair | TRX_USD |
action | action | buy, sell |
type | order type | limit, market, stop_limit |
amount | amount | 10.000000 |
price | price | 0.05000 |
stop_price | stop price | 0.04000 |
value | value | 0.50 |
amount_processed | processed amount | 0.000000 |
amount_remaining | remaining amount | 10.000000 |
value_processed | processed value | 0.00 |
value_remaining | remaining value | 0.50 |
api | mark of order creation via API | true, false |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_orders';
$req = json_encode(array(
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"ts": 1644398635534
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"36149941": {
"id": "36149941",
"date": 1643186519,
"pair": "TRX_RUB",
"action": "buy",
"type": "stop_limit",
"amount": "10.000000",
"price": "5.00",
"value": "50.00",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "50.00",
"stop_price": "4.30"
},
"36150146": {
"id": "36150146",
"date": 1643186799,
"pair": "TRX_RUB",
"action": "sell",
"type": "stop_limit",
"amount": "15.000000",
"price": "4.00",
"value": "60.00",
"amount_processed": "0.000000",
"amount_remaining": "15.000000",
"value_processed": "0.00",
"value_remaining": "60.00",
"stop_price": "4.00"
},
"36989287": {
"id": "36989287",
"date": 1644391218,
"pair": "TRX_USD",
"action": "buy",
"type": "limit",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50"
},
"36989301": {
"id": "36989301",
"date": 1644391233,
"pair": "TRX_USD",
"action": "sell",
"type": "limit",
"amount": "10.000000",
"price": "0.07000",
"value": "0.70",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.70"
},
"36989322": {
"id": "36989322",
"date": 1644391269,
"pair": "TRX_USD",
"action": "buy",
"type": "stop_limit",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50",
"stop_price": "0.04000"
},
"36995144": {
"id": "36995144",
"date": 1644398632,
"pair": "DASH_USD",
"action": "buy",
"type": "limit",
"amount": "0.01000000",
"price": "100.00",
"value": "1.00",
"amount_processed": "0.00000000",
"amount_remaining": "0.01000000",
"value_processed": "0.00",
"value_remaining": "1.00"
}
}
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_orders';
$req = json_encode(array(
'pair' => 'BTC_USD,TRX_USD',
'action' => 'buy',
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "BTC_USD,TRX_USD",
"action": "buy",
"ts": 1644396742116
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"36989287": {
"id": "36989287",
"date": 1644391218,
"pair": "TRX_USD",
"action": "buy",
"type": "limit",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50"
},
"36989322": {
"id": "36989322",
"date": 1644391269,
"pair": "TRX_USD",
"action": "buy",
"type": "stop_limit",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50",
"stop_price": "0.04000"
}
}
}
Getting the history of your orders with the possibility of filtering and page-by-page loading.
Request Weight: 60
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
action | action | buy, sell |
status | status | success, processing, waiting, canceled |
date_from | timestamp of the beginning of the filtering period | 1630443600 |
date_to | timestamp of the end of the filtering period the filtering period should not exceed 32 days |
1633035599 |
append | id of the last known order for page-by-page loading of elements | 36989301 |
limit | the count of returned items (by default: 50) | 3 |
ts | timestamp in milliseconds | 1644399382490 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
items | list of orders | |
id | order id | 28203919 |
date | timestamp of order creation | 1631198637 |
pair | pair | BTC_USD |
action | action | buy, sell |
type | order type | limit, market, stop_limit |
status | status | success, processing, waiting, canceled |
amount | amount | 0.00010000 |
price | price | 47880.00 |
stop_price | stop price | 60000.00 |
value | value | 4.79 |
amount_processed | processed amount | 0.000000 |
amount_remaining | remaining amount | 0.00010000 |
value_processed | processed value | 0.00 |
value_remaining | remaining value | 4.79 |
api | mark of order creation via API | true, false |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_history';
$req = json_encode(array(
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"limit": 3,
"ts": 1644399161866
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"36989301": {
"id": "36989301",
"date": 1644391233,
"pair": "TRX_USD",
"action": "sell",
"type": "limit",
"status": "processing",
"amount": "10.000000",
"price": "0.07000",
"value": "0.70",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.70"
},
"36989322": {
"id": "36989322",
"date": 1644391269,
"pair": "TRX_USD",
"action": "buy",
"type": "stop_limit",
"status": "processing",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50",
"stop_price": "0.04000"
},
"36995144": {
"id": "36995144",
"date": 1644398632,
"pair": "DASH_USD",
"action": "buy",
"type": "limit",
"status": "processing",
"amount": "0.01000000",
"price": "100.00",
"value": "1.00",
"amount_processed": "0.00000000",
"amount_remaining": "0.01000000",
"value_processed": "0.00",
"value_remaining": "1.00"
}
}
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_history';
$req = json_encode(array(
'append' => 36989301,
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"append": 36989301,
"limit": 3,
"ts": 1644399899071
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"36942226": {
"id": "36942226",
"date": 1644328859,
"pair": "TRX_RUB",
"action": "buy",
"type": "limit",
"status": "success",
"amount": "10.000000",
"price": "5.10",
"value": "51.00",
"amount_processed": "10.000000",
"amount_remaining": "0.000000",
"value_processed": "51.00",
"value_remaining": "0.00"
},
"36942337": {
"id": "36942337",
"date": 1644328980,
"pair": "TRX_RUB",
"action": "buy",
"type": "stop_limit",
"status": "canceled",
"amount": "10.000000",
"price": "6.00",
"value": "60.00",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "60.00",
"stop_price": "5.50"
},
"36989287": {
"id": "36989287",
"date": 1644391218,
"pair": "TRX_USD",
"action": "buy",
"type": "limit",
"status": "processing",
"amount": "10.000000",
"price": "0.05000",
"value": "0.50",
"amount_processed": "0.000000",
"amount_remaining": "10.000000",
"value_processed": "0.00",
"value_remaining": "0.50"
}
}
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_history';
$req = json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
'action' => 'buy',
'status' => 'canceled',
'date_from' => strtotime('01.09.2021 00:00:00'),
'date_to' => strtotime('30.09.2021 23:59:59'),
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "BTC_USD,BTC_RUB",
"action": "buy",
"status": "canceled",
"date_from": 1630443600,
"date_to": 1633035599,
"limit": 3,
"ts": 1644399382490
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"28203919": {
"id": "28203919",
"date": 1631198637,
"pair": "BTC_USD",
"action": "buy",
"type": "stop_limit",
"status": "canceled",
"amount": "0.00010000",
"price": "47880.00",
"value": "4.79",
"amount_processed": "0.00000000",
"amount_remaining": "0.00010000",
"value_processed": "0.00",
"value_remaining": "4.79",
"stop_price": "60000.00"
},
"28252727": {
"id": "28252727",
"date": 1631274716,
"pair": "BTC_USD",
"action": "buy",
"type": "limit",
"status": "canceled",
"amount": "0.00010000",
"price": "10000.00",
"value": "1.00",
"amount_processed": "0.00000000",
"amount_remaining": "0.00010000",
"value_processed": "0.00",
"value_remaining": "1.00"
},
"29032159": {
"id": "29032159",
"date": 1632483924,
"pair": "BTC_USD",
"action": "buy",
"type": "stop_limit",
"status": "canceled",
"amount": "0.00010000",
"price": "44717.16",
"value": "4.48",
"amount_processed": "0.00000000",
"amount_remaining": "0.00010000",
"value_processed": "0.00",
"value_remaining": "4.48",
"stop_price": "10000.00"
}
}
}
Getting your trades with the possibility of filtering and page-by-page loading.
Request Weight: 60
Request Parameters:
Parameter | Description | Example |
---|---|---|
pair | list of pairs | BTC_USD,BTC_RUB |
action | action | buy, sell |
date_from | timestamp of the beginning of the filtering period | 1630443600 |
date_to | timestamp of the end of the filtering period the filtering period should not exceed 32 days |
1633035599 |
append | id of the last known transaction for page-by-page loading of items | 14163029 |
limit | the count of returned items (by default: 50) | 3 |
ts | timestamp in milliseconds | 1644399382490 |
Response Parameters:
Parameter | Description | Example |
---|---|---|
success | request success indicator | true, false |
items | list of trades | |
id | trade id | 12259786 |
date | trade timestamp | 1632754083 |
pair | pair | BTC_USD |
action | action | buy, sell |
status | status | success, processing |
amount | amount | 0.00010000 |
price | price | 44144.00 |
value | value | 4.42 |
is_maker | you are a maker | true, false |
is_taker | you are a taker | true, false |
m_order_id | maker's order id | 38209521 |
m_transaction_id | maker's transaction id | 1505475255 |
m_fee | maker's commission | 0.03 |
t_order_id | taker's order id | 38209521 |
t_transaction_id | taker's transaction id | 15054752556 |
t_fee | taker's commission | 0.36 |
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_trades';
$req = json_encode(array(
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"limit": 3,
"ts": 1644400380453
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"14163029": {
"id": "14163029",
"date": 1644328859,
"pair": "TRX_RUB",
"action": "buy",
"status": "success",
"amount": "10.000000",
"price": "5.10",
"value": "51.00",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1597309838"
},
"14175584": {
"id": "14175584",
"date": 1644400287,
"pair": "TRX_USD",
"action": "sell",
"status": "success",
"amount": "10.000000",
"price": "0.06961",
"value": "0.70",
"is_maker": true,
"is_taker": true,
"m_transaction_id": "1597903047",
"t_transaction_id": "1597903042"
},
"14175600": {
"id": "14175600",
"date": 1644400375,
"pair": "TRX_USD",
"action": "buy",
"status": "success",
"amount": "10.000000",
"price": "0.06963",
"value": "0.70",
"is_maker": true,
"is_taker": false,
"m_transaction_id": "1597904047"
}
}
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_trades';
$req = json_encode(array(
'append' => 14163029,
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"append": 14163029,
"limit": 3,
"ts": 1644400526581
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"14162999": {
"id": "14162999",
"date": 1644328727,
"pair": "TRX_RUB",
"action": "buy",
"status": "success",
"amount": "8.983649",
"price": "5.10",
"value": "45.81",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1597308117"
},
"14163000": {
"id": "14163000",
"date": 1644328727,
"pair": "TRX_RUB",
"action": "buy",
"status": "success",
"amount": "1.016351",
"price": "5.10",
"value": "5.18",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1597308120"
},
"14163006": {
"id": "14163006",
"date": 1644328754,
"pair": "TRX_RUB",
"action": "buy",
"status": "success",
"amount": "10.000000",
"price": "5.10",
"value": "51.00",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1597308453"
}
}
}
PHP
$msec = round(microtime(true) * 1000);
$apiId = 'bd443f00-092c-4436-92a4-a704ef679e24';
$apiSecret = 'api_secret_key';
$method = 'my_trades';
$req = json_encode(array(
'pair' => 'BTC_USD,BTC_RUB',
'action' => 'buy',
'date_from' => strtotime('01.09.2021 00:00:00'),
'date_to' => strtotime('30.09.2021 23:59:59'),
'limit' => 3,
'ts' => $msec,
));
$sign = hash_hmac('sha256', $method.$req, $apiSecret);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://payeer.com/api/trade/".$method);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json",
"API-ID: ".$apiId,
"API-SIGN: ".$sign
));
$response = curl_exec($ch);
curl_close($ch);
echo '<pre>'; print_r(json_decode($response, true)); echo '</pre>';
-
Request (application/json)
-
Headers
API-ID: bd443f00-092c-4436-92a4-a704ef679e24 API-SIGN: f133d2e7a960a3db86052be6d4f7699313e9416bce557868e7ad0f026c67c9ca
-
Body
-
{
"pair": "BTC_USD,BTC_RUB",
"action": "buy",
"date_from": 1630443600,
"date_to": 1633035599,
"limit": 3,
"ts": 1644400662184
}
-
Response 200 (application/json)
- Body
{
"success": true,
"items": {
"12259786": {
"id": "12259786",
"date": 1632754083,
"pair": "BTC_USD",
"action": "buy",
"status": "success",
"amount": "0.00010000",
"price": "44144.00",
"value": "4.42",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1505475255"
},
"12259796": {
"id": "12259796",
"date": 1632754158,
"pair": "BTC_USD",
"action": "buy",
"status": "success",
"amount": "0.00010000",
"price": "44000.00",
"value": "4.40",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1505476013"
},
"12259915": {
"id": "12259915",
"date": 1632754502,
"pair": "BTC_USD",
"action": "buy",
"status": "success",
"amount": "0.00010000",
"price": "44000.00",
"value": "4.40",
"is_maker": false,
"is_taker": true,
"t_transaction_id": "1505480022"
}
}
}