Skip to content

Cotización por exchange específico

GET
/api/{exchange}/{coin}/{fiat}/{volumen}

Devuelve la cotización de un exchange específico.

Parámetros

Path Parameters

exchange*

Proveedor a consultar

Tipostring
Requerido
Enumxapo, bitsoalpha, bitso, trubit, ripio, saldo, paxfulp2p, binance, bybitp2p, huobip2p, bybit, coinexp2p, kucoinp2p, binancep2p, lnp2pbotp2p, okexp2p, bingxp2p, trubitp2p, bitgetp2p
Ejemploxapo
coin*

Cripto a operar

Tipostring
Requerido
EnumBTC, ETH, USDT, USDC, DAI, UXD, USDP, WLD, BNB, SOL, XRP, ADA, AVAX, DOGE, TRX, LINK, DOT, MATIC, SHIB, LTC, BCH, EOS, XLM, FTM, AAVE, UNI, ALGO, BAT, PAXG, CAKE, AXS, SLP, MANA, SAND, CHZ
EjemploBTC
fiat*

Moneda contra la que se opera

Tipostring
Requerido
EnumARS, BRL, CLP, COP, MXN, PEN, VES, BOB, UYU, DOP, PYG, USD, EUR
EjemploARS
volumen*

Volumen a operar, utilizar el punto como separador decimal

Tiponumber
Requerido
Ejemplo0.1

Respuestas

Cotización exitosa
application/json
JSON
{
"ask": 0,
"totalAsk": 0,
"bid": 0,
"totalBid": 0,
"time": 0
}

Ejemplos

cURL
curl -X GET \
'https://criptoya.com/api/xapo/BTC/ARS/0.1' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://criptoya.com/api/xapo/BTC/ARS/0.1', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://criptoya.com/api/xapo/BTC/ARS/0.1';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://criptoya.com/api/xapo/BTC/ARS/0.1'

headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, headers=headers)
print(response.json())
Powered by VitePress OpenAPI