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
RequeridoEnumxapo, satoshitango, cryptomkt, okexp2p, cryptomktpro, bingxp2p, binancep2p, bybitp2p, buda, paxfulp2p, bitgetp2p, lnp2pbotp2p, coinexp2p
Ejemplo
xapo
coin*
Cripto a operar
Tipostring
RequeridoEnumBTC, 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
Ejemplo
BTC
fiat*
Moneda contra la que se opera
Tipostring
RequeridoEnumARS, BRL, CLP, COP, MXN, PEN, VES, BOB, UYU, DOP, PYG, USD, EUR
Ejemplo
ARS
volumen*
Volumen a operar, utilizar el punto como separador decimal
Tiponumber
RequeridoEjemplo
0.1
Respuestas
Cotización exitosa
application/json
JSON
{
"ask": 0,
"totalAsk": 0,
"bid": 0,
"totalBid": 0,
"time": 0
}
GET
/api/{exchange}/{coin}/{fiat}/{volumen}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())