P2P.Army API
Detailed guide to the P2P.Army service API. It allows you to get up-to-date data on P2P markets, prices, advertisements, as well as historical statistics. To access all methods (except ping and time), an API key passed in the X-APIKEY header is required.
URL base
Autorización
Your personal API key.
Inicio rápido
Para usar los métodos privados de la API, debes obtener una clave de API en tu cuenta personal y pasarla en la cabecera X-APIKEY en cada solicitud.
General
/pingCheck API availability
Respuestas
{
"pong": 1
}import axios from 'axios';
const options = {
method: 'GET',
url: 'https://p2p.army/v1/api/ping',
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X GET "https://p2p.army/v1/api/ping"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/timeServer time
Returns current server time in Timestamp UTC format.
Respuestas
{
"time": 1712710660
}import axios from 'axios';
const options = {
method: 'GET',
url: 'https://p2p.army/v1/api/time',
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X GET "https://p2p.army/v1/api/time"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Datos P2P
/get_p2p_marketsP2P platforms list
Get list of supported P2P platforms.
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
rows | array<string> | — |
status | Status | Response status (1 - success) |
{
"rows": [
"binance",
"bybit",
"huobi",
"okx",
"bitget",
"bingx",
"kucoin",
"mexc"
],
"status": 1
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_markets',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_markets" \ -H "X-APIKEY: YOUR_API_KEY"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_p2p_fiatsFiat currencies list
Get list of supported fiat currencies in P2P.
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
rows | array<string> | — |
status | Status | Response status (1 - success) |
{
"rows": [
"AED",
"ALL",
"AMD",
"RUB",
"USD",
"EUR"
],
"status": 1
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_fiats',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_fiats" \ -H "X-APIKEY: YOUR_API_KEY"
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_fiats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_p2p_assetsP2P Crypto assets
Get available crypto assets for a specific exchange and currency.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | Exchange code (e.g., binance) |
fiat* | string | Fiat currency code (e.g., RUB) |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
assets | array<string> | — |
status | Status | Response status (1 - success) |
{
"assets": [
"USDT",
"BTC",
"ETH",
"USDC"
],
"status": 1
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_assets',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string"
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_assets" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string"}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_assets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string"}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_popular_p2p_payment_methodsP2P Payment methods
Get P2P payment methods by exchange and currency.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
limit | integer | Withdrawal limit |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
payment_methods | array<PaymentMethod> | — |
ads_count_BUY | integer | Number of ads in BUY section |
ads_count_SELL | integer | Number of ads in SELL section |
ads_count_total | integer | Total ads |
activity_24h | integer | Activity for 24 hours |
market | string | Exchange code |
title | string | Payment method name |
payment_method | string | Payment method code |
payment_method_vendor_id | integer | Payment method ID on the platform (only for some) |
status | Status | Response status (1 - success) |
{
"payment_methods": [
{
"ads_count_BUY": 0,
"ads_count_SELL": 0,
"ads_count_total": 0,
"activity_24h": 0,
"market": "string",
"title": "string",
"payment_method": "string",
"payment_method_vendor_id": 0
}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_popular_p2p_payment_methods',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_popular_p2p_payment_methods" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_popular_p2p_payment_methods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_p2p_pricesP2P Prices
Get aggregated prices on P2P platform.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
asset* | string | — |
limit | integer | TOP prices limit (default 10) |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
prices | array<P2PPrice> | — |
payment_method | string | Payment method code |
payment_method_vendor_id | integer | — |
updated_BUY | integer | Timestamp UTC of BUY price synchronization |
updated_SELL | integer | Timestamp UTC of SELL price synchronization |
prices_BUY | array<string> | Array of TOP10 prices from BUY section |
prices_SELL | array<string> | Array of TOP10 prices from SELL section |
avg_price_BUY | number | Average price from BUY (with outlier filtering) |
avg_price_SELL | number | Average price from SELL (with outlier filtering) |
activity_24h | integer | Activity for 24 hours |
ads_count_BUY | integer | — |
ads_count_SELL | integer | — |
ads_count_total | integer | — |
status | Status | Response status (1 - success) |
{
"prices": [
{
"payment_method": "string",
"payment_method_vendor_id": 0,
"updated_BUY": 0,
"updated_SELL": 0,
"prices_BUY": [
"string"
],
"prices_SELL": [
"string"
],
"avg_price_BUY": 0,
"avg_price_SELL": 0,
"activity_24h": 0,
"ads_count_BUY": 0,
"ads_count_SELL": 0,
"ads_count_total": 0
}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_prices',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"asset": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_prices" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","asset":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","asset":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_p2p_order_bookP2P Ads (Standard)
Get ads in a unified format from all supported exchanges.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
asset* | string | — |
side* | string | — |
payment_method | string | Payment method code |
limit | integer | — |
amount | number | Filter by fiat amount |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
ads | array<P2PAd> | — |
pos | integer | Ad position |
updated_at | integer | Timestamp UTC, ad retrieval time |
market | string | Exchange code |
asset | string | Crypto asset |
fiat | string | Fiat currency |
side | string | — |
payment_methods | array<string> | List of all specified payment methods |
price | string | Price |
surplus_amount | string | Crypto asset volume in the ad |
surplus_fiat | number | Ad volume in fiat (surplus_amount * price) |
min_fiat | string | Minimum trade amount |
max_fiat | string | Maximum trade amount |
text | string | Ad text (if available) |
user_name | string | Username on P2P exchange |
user_id | string | User ID on P2P exchange (format depends on platform) |
adv_id | string | Ad ID on P2P exchange |
user_orders | integer | Number of orders (total or for 30 days) |
user_rate | integer | Order completion percentage |
is_merchant | integer | Merchant status |
status | Status | Response status (1 - success) |
{
"ads": [
{
"pos": 0,
"updated_at": 0,
"market": "string",
"asset": "string",
"fiat": "string",
"side": "string",
"payment_methods": [
"string"
],
"price": "string",
"surplus_amount": "string",
"surplus_fiat": 0,
"min_fiat": "string",
"max_fiat": "string",
"text": "string",
"user_name": "string",
"user_id": "string",
"adv_id": "string",
"user_orders": 0,
"user_rate": 0,
"is_merchant": 0
}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_order_book',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"asset": "string",
"side": "string",
"payment_method": "string",
"limit": 0,
"amount": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_order_book" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","asset":"string","side":"string","payment_method":"string","limit":0,"amount":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_order_book",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","asset":"string","side":"string","payment_method":"string","limit":0,"amount":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/get_p2p_vendor_bookVendor Ads (Original)
Get original ads from P2P platforms without unified formatting.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
asset* | string | — |
side* | string | — |
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
vendor_ads | array<object> | Array of data from exchanges in their original format |
status | Status | Response status (1 - success) |
{
"vendor_ads": [
{}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/get_p2p_vendor_book',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"asset": "string",
"side": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/get_p2p_vendor_book" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","asset":"string","side":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/get_p2p_vendor_book",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","asset":"string","side":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Statistics
/stat/p2p_marketsExchange statistics
Get global statistics on P2P platforms.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
markets | array<MarketStat> | — |
id | integer | Internal exchange ID |
name | string | Exchange code |
title | string | Exchange name |
place | integer | Rank |
activity_24h | integer | Activity index from P2P.Army |
ads_BUY | integer | Number of ads in BUY section |
ads_SELL | integer | Number of ads in SELL section |
ads_total | integer | — |
volume_usd_BUY | string | Volume in $ of ads in BUY section |
volume_usd_SELL | string | Volume in $ of ads in SELL section |
volume_usd_total | string | — |
count_fiats | integer | Number of represented fiat currencies |
status | Status | Response status (1 - success) |
{
"markets": [
{
"id": 0,
"name": "string",
"title": "string",
"place": 0,
"activity_24h": 0,
"ads_BUY": 0,
"ads_SELL": 0,
"ads_total": 0,
"volume_usd_BUY": "string",
"volume_usd_SELL": "string",
"volume_usd_total": "string",
"count_fiats": 0
}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/stat/p2p_markets',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/stat/p2p_markets" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/stat/p2p_markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/stat/p2p_fiatsCurrency statistics
Get statistics of ad distribution and volumes by currency.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
type* | string | Requested statistics type |
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
fiats | array<object> | — |
fiat | string | — |
points | number | Total value across all exchanges |
by_markets | object | Values broken down by exchange |
status | Status | Response status (1 - success) |
{
"fiats": [
{
"fiat": "string",
"points": 0,
"by_markets": {}
}
],
"status": 0
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/stat/p2p_fiats',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"type": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/stat/p2p_fiats" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/stat/p2p_fiats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"type":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}History
/history/p2p_pricesPrice history
Get historical price data with detail by hours or days.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
asset* | string | — |
payment_method* | string | Payment method code |
mode | string | Preset period |
from_date | string | Period start (Timestamp UTC), if mode not specified |
to_date | string | Period end (Timestamp UTC), if mode not specified |
period_type | string | Detail: 1H (by hour) or 0-23 (specific hour of the day) |
date_format | string | — |
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
history | array<object> | — |
date | string | — |
buy | number | Minimum BUY price |
buy_avg | number | Average BUY TOP5 price |
sell | number | Maximum SELL price |
sell_avg | number | Average SELL TOP5 price |
{
"history": [
{
"date": "string",
"buy": 0,
"buy_avg": 0,
"sell": 0,
"sell_avg": 0
}
]
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/history/p2p_prices',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"asset": "string",
"payment_method": "string",
"mode": "string",
"from_date": "string",
"to_date": "string",
"period_type": "string",
"date_format": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/history/p2p_prices" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","asset":"string","payment_method":"string","mode":"string","from_date":"string","to_date":"string","period_type":"string","date_format":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/history/p2p_prices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","asset":"string","payment_method":"string","mode":"string","from_date":"string","to_date":"string","period_type":"string","date_format":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/history/p2p_marketsExchange history
Historical activity and volume indicators for a specific exchange.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
from_date* | string | Period start (Timestamp or YYYY-MM-DD) |
to_date | string | — |
date_format | string | — |
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
rows | array<object> | — |
date | string | — |
activity24H | integer | — |
count_BUY | integer | — |
count_SELL | integer | — |
volume_usd_BUY | string | — |
volume_usd_SELL | string | — |
count | integer | — |
first_row_date | string | — |
last_row_date | string | — |
{
"rows": [
{
"date": "string",
"activity24H": 0,
"count_BUY": 0,
"count_SELL": 0,
"volume_usd_BUY": "string",
"volume_usd_SELL": "string"
}
],
"count": 0,
"first_row_date": "string",
"last_row_date": "string"
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/history/p2p_markets',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"from_date": "string",
"to_date": "string",
"date_format": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/history/p2p_markets" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","from_date":"string","to_date":"string","date_format":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/history/p2p_markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","from_date":"string","to_date":"string","date_format":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}/history/p2p_fiatsFiat history
Historical activity and volume indicators for a specific currency on the selected exchange.
Cuerpo de la solicitud
| Propiedad | Tipo | Descripción |
|---|---|---|
market* | string | — |
fiat* | string | — |
from_date* | string | — |
to_date | string | — |
date_format | string | — |
limit | integer | — |
Respuestas
| Propiedad | Tipo | Descripción |
|---|---|---|
rows | array<object> | — |
date | string | — |
activity24H | integer | — |
count_BUY | integer | — |
count_SELL | integer | — |
volume_usd_BUY | string | — |
volume_usd_SELL | string | — |
count | integer | — |
first_row_date | string | — |
last_row_date | string | — |
{
"rows": [
{
"date": "string",
"activity24H": 0,
"count_BUY": 0,
"count_SELL": 0,
"volume_usd_BUY": "string",
"volume_usd_SELL": "string"
}
],
"count": 0,
"first_row_date": "string",
"last_row_date": "string"
}import axios from 'axios';
const options = {
method: 'POST',
url: 'https://p2p.army/v1/api/history/p2p_fiats',
headers: {
'X-APIKEY': 'YOUR_API_KEY'
},
data: {
"market": "string",
"fiat": "string",
"from_date": "string",
"to_date": "string",
"date_format": "string",
"limit": 0
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});curl -X POST "https://p2p.army/v1/api/history/p2p_fiats" \
-H "X-APIKEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"market":"string","fiat":"string","from_date":"string","to_date":"string","date_format":"string","limit":0}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://p2p.army/v1/api/history/p2p_fiats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{"market":"string","fiat":"string","from_date":"string","to_date":"string","date_format":"string","limit":0}',
CURLOPT_HTTPHEADER => [
"X-APIKEY: YOUR_API_KEY",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Esquemas de datos
Status
| Propiedad | Tipo | Descripción |
|---|---|---|
| Response status (1 - success) | ||
ErrorResponse
| Propiedad | Tipo | Descripción |
|---|---|---|
| status | integer | |
| errText | string | Error description |
P2PAd
| Propiedad | Tipo | Descripción |
|---|---|---|
| pos | integer | Ad position |
| updated_at | integer | Timestamp UTC, ad retrieval time |
| market | string | Exchange code |
| asset | string | Crypto asset |
| fiat | string | Fiat currency |
| side | string | BUYSELL |
| payment_methods | array <string> | List of all specified payment methods |
| price | string | Price |
| surplus_amount | string | Crypto asset volume in the ad |
| surplus_fiat | number | Ad volume in fiat (surplus_amount * price) |
| min_fiat | string | Minimum trade amount |
| max_fiat | string | Maximum trade amount |
| text | string | Ad text (if available) |
| user_name | string | Username on P2P exchange |
| user_id | string | User ID on P2P exchange (format depends on platform) |
| adv_id | string | Ad ID on P2P exchange |
| user_orders | integer | Number of orders (total or for 30 days) |
| user_rate | integer | Order completion percentage |
| is_merchant | integer | Merchant status 01 |
PaymentMethod
| Propiedad | Tipo | Descripción |
|---|---|---|
| ads_count_BUY | integer | Number of ads in BUY section |
| ads_count_SELL | integer | Number of ads in SELL section |
| ads_count_total | integer | Total ads |
| activity_24h | integer | Activity for 24 hours |
| market | string | Exchange code |
| title | string | Payment method name |
| payment_method | string | Payment method code |
| payment_method_vendor_id | integer | Payment method ID on the platform (only for some) |
P2PPrice
| Propiedad | Tipo | Descripción |
|---|---|---|
| payment_method | string | Payment method code |
| payment_method_vendor_id | integer | |
| updated_BUY | integer | Timestamp UTC of BUY price synchronization |
| updated_SELL | integer | Timestamp UTC of SELL price synchronization |
| prices_BUY | array <string> | Array of TOP10 prices from BUY section |
| prices_SELL | array <string> | Array of TOP10 prices from SELL section |
| avg_price_BUY | number | Average price from BUY (with outlier filtering) |
| avg_price_SELL | number | Average price from SELL (with outlier filtering) |
| activity_24h | integer | Activity for 24 hours |
| ads_count_BUY | integer | |
| ads_count_SELL | integer | |
| ads_count_total | integer |
MarketStat
| Propiedad | Tipo | Descripción |
|---|---|---|
| id | integer | Internal exchange ID |
| name | string | Exchange code |
| title | string | Exchange name |
| place | integer | Rank |
| activity_24h | integer | Activity index from P2P.Army |
| ads_BUY | integer | Number of ads in BUY section |
| ads_SELL | integer | Number of ads in SELL section |
| ads_total | integer | |
| volume_usd_BUY | string | Volume in $ of ads in BUY section |
| volume_usd_SELL | string | Volume in $ of ads in SELL section |
| volume_usd_total | string | |
| count_fiats | integer | Number of represented fiat currencies |