Market data API

Access tancaro markets, quotes and historical observations from your application over HTTP.

Public accesshttps://p2p.pablo-dzv.workers.dev/api/v1/agent
Open playground

Playground

GET /markets
View cURL
curl 'https://p2p.pablo-dzv.workers.dev/api/v1/agent/markets?country=BO&asset=USDT&quote_currency=BOB&kind=p2p_aggregate&limit=5'

Response

Send a request to see the HTTP status and JSON.

Quickstart

Look up a series_id in the market catalog. Use that identifier to read the latest quote or request its history.

  1. /marketsMarket catalog
  2. /quoteLatest quote
  3. /historyHistory

How to read the data

Prices are in the quote currency per unit of the base asset. The API preserves decimals as strings.

Buy and sell each report their observation and freshness when available. Official rates show their effective date.

Market catalog

GET/api/v1/agent/marketsTry endpoint

Filter by country, pair, category, or source. When next_offset has a value, pass it as offset to request the next page.

Parameters

countrystring · Optional
Two-letter country code, for example BO or PE.
assetstring · Optional
Base asset, for example USD, USDT, or USDC.
quote_currencystring · Optional
Quote currency, for example BOB or PEN.
kindstring · Optional
Series category. Use official_rate to find official rates.
p2p_aggregate · p2p_exchange · provider_quote · official_rate
sourcestring · Optional
Exact source name, case-insensitive, for example BCB.
limitinteger · Optional
Maximum number of series per page.
offsetinteger · Optional
Starting position returned in next_offset.

Responses

200
Successful request. MarketPage
400
Invalid parameters or unsupported range. Error
503
Data is temporarily unavailable. Error

Latest quote

GET/api/v1/agent/quoteTry endpoint

Read a series by its identifier. P2P quotes use buy and sell from the user’s perspective. Official rates use official_rate.

Parameters

series_idinteger · Required
Series identifier returned by the catalog.

Responses

200
Successful request. Quote
400
Invalid parameters or unsupported range. Error
404
The series is outside the public catalog. Error
503
Data is temporarily unavailable. Error

History

GET/api/v1/agent/historyTry endpoint

Read observations by interval. The range is aligned outward to interval boundaries and capped at 500 intervals and 366 days. Gaps are omitted and official rates use daily intervals.

Parameters

series_idinteger · Required
Series identifier returned by the catalog.
frominteger · Required
Inclusive start in Unix seconds UTC.
tointeger · Required
Exclusive end in Unix seconds UTC. The aligned end can be up to 24 hours ahead.
stepinteger · Optional
Interval in seconds. Defaults to 60 seconds, or 86400 for official rates.
60 · 300 · 3600 · 14400 · 86400

Responses

200
Successful request. History
400
Invalid parameters or unsupported range. Error
404
The series is outside the public catalog. Error
503
Data is temporarily unavailable. Error