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.

Base URL

https://p2p.army/v1/api
Main API server

Authorization

ApiKeyAuth (apiKey)

Your personal API key.

header: X-APIKEY

Quick Start

To use private API methods, you need to obtain an API key in your personal account and pass it in the X-APIKEY header for each request.

General

GET/ping

Check API availability

Responses

200API is available
JSON Example:
{
  "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);
});
js
GET/time

Server time

Returns current server time in Timestamp UTC format.

Responses

200Successful response
JSON Example:
{
  "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);
});
js

P2P Data

POST/get_p2p_markets

P2P platforms list

Get list of supported P2P platforms.

Responses

200Successful response
Response Structure:
PropertyTypeDescription
rows
array<string>
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_p2p_fiats

Fiat currencies list

Get list of supported fiat currencies in P2P.

Responses

200Successful response
Response Structure:
PropertyTypeDescription
rows
array<string>
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_p2p_assets

P2P Crypto assets

Get available crypto assets for a specific exchange and currency.

Request Body

application/json
PropertyTypeDescription
market*
stringExchange code (e.g., binance)
fiat*
stringFiat currency code (e.g., RUB)

Responses

200Successful response
Response Structure:
PropertyTypeDescription
assets
array<string>
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_popular_p2p_payment_methods

P2P Payment methods

Get P2P payment methods by exchange and currency.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
limit
integerWithdrawal limit

Responses

200Successful response
Response Structure:
PropertyTypeDescription
payment_methods
array<PaymentMethod>
ads_count_BUY
integerNumber of ads in BUY section
ads_count_SELL
integerNumber of ads in SELL section
ads_count_total
integerTotal ads
activity_24h
integerActivity for 24 hours
market
stringExchange code
title
stringPayment method name
payment_method
stringPayment method code
payment_method_vendor_id
integerPayment method ID on the platform (only for some)
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_p2p_prices

P2P Prices

Get aggregated prices on P2P platform.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
asset*
string
limit
integerTOP prices limit (default 10)

Responses

200Successful response
Response Structure:
PropertyTypeDescription
prices
array<P2PPrice>
payment_method
stringPayment method code
payment_method_vendor_id
integer
updated_BUY
integerTimestamp UTC of BUY price synchronization
updated_SELL
integerTimestamp 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
numberAverage price from BUY (with outlier filtering)
avg_price_SELL
numberAverage price from SELL (with outlier filtering)
activity_24h
integerActivity for 24 hours
ads_count_BUY
integer
ads_count_SELL
integer
ads_count_total
integer
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_p2p_order_book

P2P Ads (Standard)

Get ads in a unified format from all supported exchanges.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
asset*
string
side*
string
payment_method
stringPayment method code
limit
integer
amount
numberFilter by fiat amount

Responses

200Successful response
Response Structure:
PropertyTypeDescription
ads
array<P2PAd>
pos
integerAd position
updated_at
integerTimestamp UTC, ad retrieval time
market
stringExchange code
asset
stringCrypto asset
fiat
stringFiat currency
side
string
payment_methods
array<string>List of all specified payment methods
price
stringPrice
surplus_amount
stringCrypto asset volume in the ad
surplus_fiat
numberAd volume in fiat (surplus_amount * price)
min_fiat
stringMinimum trade amount
max_fiat
stringMaximum trade amount
text
stringAd text (if available)
user_name
stringUsername on P2P exchange
user_id
stringUser ID on P2P exchange (format depends on platform)
adv_id
stringAd ID on P2P exchange
user_orders
integerNumber of orders (total or for 30 days)
user_rate
integerOrder completion percentage
is_merchant
integerMerchant status
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/get_p2p_vendor_book

Vendor Ads (Original)

Get original ads from P2P platforms without unified formatting.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
asset*
string
side*
string
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
vendor_ads
array<object>Array of data from exchanges in their original format
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js

Statistics

POST/stat/p2p_markets

Exchange statistics

Get global statistics on P2P platforms.

Request Body

application/json
PropertyTypeDescription
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
markets
array<MarketStat>
id
integerInternal exchange ID
name
stringExchange code
title
stringExchange name
place
integerRank
activity_24h
integerActivity index from P2P.Army
ads_BUY
integerNumber of ads in BUY section
ads_SELL
integerNumber of ads in SELL section
ads_total
integer
volume_usd_BUY
stringVolume in $ of ads in BUY section
volume_usd_SELL
stringVolume in $ of ads in SELL section
volume_usd_total
string
count_fiats
integerNumber of represented fiat currencies
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js
POST/stat/p2p_fiats

Currency statistics

Get statistics of ad distribution and volumes by currency.

Request Body

application/json
PropertyTypeDescription
type*
stringRequested statistics type
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
fiats
array<object>
fiat
string
points
numberTotal value across all exchanges
by_markets
objectValues broken down by exchange
status
StatusResponse status (1 - success)
JSON Example:
{
  "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);
});
js

History

POST/history/p2p_prices

Price history

Get historical price data with detail by hours or days.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
asset*
string
payment_method*
stringPayment method code
mode
stringPreset period
from_date
stringPeriod start (Timestamp UTC), if mode not specified
to_date
stringPeriod end (Timestamp UTC), if mode not specified
period_type
stringDetail: 1H (by hour) or 0-23 (specific hour of the day)
date_format
string
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
history
array<object>
date
string
buy
numberMinimum BUY price
buy_avg
numberAverage BUY TOP5 price
sell
numberMaximum SELL price
sell_avg
numberAverage SELL TOP5 price
JSON Example:
{
  "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);
});
js
POST/history/p2p_markets

Exchange history

Historical activity and volume indicators for a specific exchange.

Request Body

application/json
PropertyTypeDescription
market*
string
from_date*
stringPeriod start (Timestamp or YYYY-MM-DD)
to_date
string
date_format
string
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
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
JSON Example:
{
  "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);
});
js
POST/history/p2p_fiats

Fiat history

Historical activity and volume indicators for a specific currency on the selected exchange.

Request Body

application/json
PropertyTypeDescription
market*
string
fiat*
string
from_date*
string
to_date
string
date_format
string
limit
integer

Responses

200Successful response
Response Structure:
PropertyTypeDescription
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
JSON Example:
{
  "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);
});
js

Data Schemas

Status

PropertyTypeDescription
Response status (1 - success)

ErrorResponse

PropertyTypeDescription
statusinteger
errTextstringError description

P2PAd

PropertyTypeDescription
posintegerAd position
updated_atintegerTimestamp UTC, ad retrieval time
marketstringExchange code
assetstringCrypto asset
fiatstringFiat currency
sidestring
BUYSELL
payment_methodsarray <string>List of all specified payment methods
pricestringPrice
surplus_amountstringCrypto asset volume in the ad
surplus_fiatnumberAd volume in fiat (surplus_amount * price)
min_fiatstringMinimum trade amount
max_fiatstringMaximum trade amount
textstringAd text (if available)
user_namestringUsername on P2P exchange
user_idstringUser ID on P2P exchange (format depends on platform)
adv_idstringAd ID on P2P exchange
user_ordersintegerNumber of orders (total or for 30 days)
user_rateintegerOrder completion percentage
is_merchantintegerMerchant status
01

PaymentMethod

PropertyTypeDescription
ads_count_BUYintegerNumber of ads in BUY section
ads_count_SELLintegerNumber of ads in SELL section
ads_count_totalintegerTotal ads
activity_24hintegerActivity for 24 hours
marketstringExchange code
titlestringPayment method name
payment_methodstringPayment method code
payment_method_vendor_idintegerPayment method ID on the platform (only for some)

P2PPrice

PropertyTypeDescription
payment_methodstringPayment method code
payment_method_vendor_idinteger
updated_BUYintegerTimestamp UTC of BUY price synchronization
updated_SELLintegerTimestamp UTC of SELL price synchronization
prices_BUYarray <string>Array of TOP10 prices from BUY section
prices_SELLarray <string>Array of TOP10 prices from SELL section
avg_price_BUYnumberAverage price from BUY (with outlier filtering)
avg_price_SELLnumberAverage price from SELL (with outlier filtering)
activity_24hintegerActivity for 24 hours
ads_count_BUYinteger
ads_count_SELLinteger
ads_count_totalinteger

MarketStat

PropertyTypeDescription
idintegerInternal exchange ID
namestringExchange code
titlestringExchange name
placeintegerRank
activity_24hintegerActivity index from P2P.Army
ads_BUYintegerNumber of ads in BUY section
ads_SELLintegerNumber of ads in SELL section
ads_totalinteger
volume_usd_BUYstringVolume in $ of ads in BUY section
volume_usd_SELLstringVolume in $ of ads in SELL section
volume_usd_totalstring
count_fiatsintegerNumber of represented fiat currencies