Skip to content

Cotización general

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

Devuelve la cotización general para todas las casas de cambio.

Parámetros

Path Parameters

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, puede ser fiat o stablecoin

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/BTC/ARS/0.1' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://criptoya.com/api/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/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/BTC/ARS/0.1'

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

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