Símbolos
Nuestras API REST API y WebSocket utilizan símbolos ligeramente diferentes para representar los mismos mercados subyacentes (los mismos pares de divisas), por lo que, en ocasiones, es necesario traducir los símbolos entre las distintas versiones.
Los endpoints REST de los activos y de los pares de activos se pueden utilizar para obtener una lista de todas las divisas y pares de divisas (mercados) disponibles, junto con todas las versiones de símbolos posibles para cada mercado.
Por ejemplo, si se llama al endpoint REST activo como https://api.kraken.com/0/public/Assets, se devolverá una respuesta similar a la siguiente:
{"error":[],"result":{...{"aclass":"currency","altname":"SRM","decimals":8,"display_decimals":5},"STORJ":{"aclass":"currency","altname":"STORJ","decimals":10,"display_decimals":5},"SUSHI":{"aclass":"currency","altname":"SUSHI","decimals":10,"display_decimals":5},"TBTC":{"aclass":"currency","altname":"TBTC","decimals":10,"display_decimals":5},"TRX":{"aclass":"currency","altname":"TRX","decimals":8,"display_decimals":6},"UNI":{"aclass":"currency","altname":"UNI","decimals":10,"display_decimals":5},"USD.HOLD":{"aclass":"currency","altname":"USD.HOLD","decimals":4,"display_decimals":2},"USD.M":{"aclass":"currency","altname":"USD.M","decimals":4,"display_decimals":4},"USDC":{"aclass":"currency","altname":"USDC","decimals":8,"display_decimals":4},"USDT":{"aclass":"currency","altname":"USDT","decimals":8,"display_decimals":4},"WAVES":{"aclass":"currency","altname":"WAVES","decimals":10,"display_decimals":5},"WBTC":{"aclass":"currency","altname":"WBTC","decimals":10,"display_decimals":5},"XBT.M":{"aclass":"currency","altname":"XBT.M","decimals":10,"display_decimals":8},"XETC":{"aclass":"currency","altname":"ETC","decimals":10,"display_decimals":5},"XETH":{"aclass":"currency","altname":"ETH","decimals":10,"display_decimals":5},"XLTC":{"aclass":"currency","altname":"LTC","decimals":10,"display_decimals":5},"XMLN":{"aclass":"currency","altname":"MLN","decimals":10,"display_decimals":5},"XREP":{"aclass":"currency","altname":"REP","decimals":10,"display_decimals":5},"XTZ":{"aclass":"currency","altname":"XTZ","decimals":8,"display_decimals":6},"XTZ.S":{"aclass":"currency","altname":"XTZ.S","decimals":8,"display_decimals":6},"XXBT":{"aclass":"currency","altname":"XBT","decimals":10,"display_decimals":5},"XXDG":{"aclass":"currency","altname":"XDG","decimals":8,"display_decimals":2}...
cuando se publica cada divisa, junto con todos sus símbolos posibles y otra información de trading (en concreto, la precisión decimal).
Del mismo modo, si se realiza una llamada al endpoint REST de pares de activos como https://api.kraken.com/0/public/AssetPairs , se devolverá una respuesta como la siguiente:
{"error":[],"result":{..."XMLNXETH":{"altname":"MLNETH","wsname":"MLN\/ETH","aclass_base":"currency","base":"XMLN","aclass_quote":"currency","quote":"XETH","lot":"unit","pair_decimals":5,"lot_decimals":8,"lot_multiplier":1,"leverage_buy":[],"leverage_sell":[],"fees":[[0,0.26],[50000,0.24],[100000,0.22],[250000,0.2],[500000,0.18],[1000000,0.16],[2500000,0.14],[5000000,0.12],[10000000,0.1]],"fees_maker":[[0,0.16],[50000,0.14],[100000,0.12],[250000,0.1],[500000,0.08],[1000000,0.06],[2500000,0.04],[5000000,0.02],[10000000,0]],"fee_volume_currency":"ZUSD","margin_call":80,"margin_stop":40,"ordermin":"0.1"},"XMLNXXBT":{"altname":"MLNXBT","wsname":"MLN\/XBT","aclass_base":"currency","base":"XMLN","aclass_quote":"currency","quote":"XXBT","lot":"unit","pair_decimals":6,"lot_decimals":8,"lot_multiplier":1,"leverage_buy":[],"leverage_sell":[],"fees":[[0,0.26],[50000,0.24],[100000,0.22],[250000,0.2],[500000,0.18],[1000000,0.16],[2500000,0.14],[5000000,0.12],[10000000,0.1]],"fees_maker":[[0,0.16],[50000,0.14],[100000,0.12],[250000,0.1],[500000,0.08],[1000000,0.06],[2500000,0.04],[5000000,0.02],[10000000,0]],"fee_volume_currency":"ZUSD","margin_call":80,"margin_stop":40,"ordermin":"0.1"},"XMLNZEUR":{"altname":"MLNEUR","wsname":"MLN\/EUR","aclass_base":"currency","base":"XMLN","aclass_quote":"currency","quote":"ZEUR","lot":"unit","pair_decimals":3,"lot_decimals":8,"lot_multiplier":1,"leverage_buy":[],"leverage_sell":[],"fees":[[0,0.26],[50000,0.24],[100000,0.22],[250000,0.2],[500000,0.18],[1000000,0.16],[2500000,0.14],[5000000,0.12],[10000000,0.1]],"fees_maker":[[0,0.16],[50000,0.14],[100000,0.12],[250000,0.1],[500000,0.08],[1000000,0.06],[2500000,0.04],[5000000,0.02],[10000000,0]],"fee_volume_currency":"ZUSD","margin_call":80,"margin_stop":40,"ordermin":"0.1"},"XMLNZUSD":{"altname":"MLNUSD","wsname":"MLN\/USD","aclass_base":"currency","base":"XMLN","aclass_quote":"currency","quote":"ZUSD","lot":"unit","pair_decimals":3,"lot_decimals":8,"lot_multiplier":1,"leverage_buy":[],"leverage_sell":[],"fees":[[0,0.26],[50000,0.24],[100000,0.22],[250000,0.2],[500000,0.18],[1000000,0.16],[2500000,0.14],[5000000,0.12],[10000000,0.1]],"fees_maker":[[0,0.16],[50000,0.14],[100000,0.12],[250000,0.1],[500000,0.08],[1000000,0.06],[2500000,0.04],[5000000,0.02],[10000000,0]],"fee_volume_currency":"ZUSD","margin_call":80,"margin_stop":40,"ordermin":"0.1"}...
cuando se publica cada par de divisas (mercado), junto con todos sus símbolos posibles, así como diversos datos de trading adicionales (precisión de precio/volumen, apalancamiento disponible, tamaños mínimos de orden, etc.).
Tickers
Un ticker es un informe de los precios de mercado actuales para un par de divisas individual e incluye toda la información siguiente:
- precio de trading más reciente
- volumen de trading más reciente
- mejor precio de oferta (más alto)
- volumen disponible al mejor precio de oferta
- mejor precio de demanda (el más bajo)
- volumen disponible al mejor precio de demanda
- información adicional de trading (máximo/mínimo del día, número de operaciones, volumen total del día, etc.)
El endpoint REST Ticker se puede utilizar para obtener los datos de Ticker para un único par de divisas, un grupo de pares de divisas o todos los mercados que Kraken ofrece actualmente.
Por ejemplo, si se realiza una llamada al endpoint Ticker como https://api.kraken.com/0/public/Ticker?pair=xdgusd, se devolverán los datos actuales del ticker únicamente para el mercado Dogecoin/USD, como:
{"error":[],"result":{"XDGUSD":{"a":["0.326930000","170","170.000"],"b":["0.326910600","4090","4090.000"],"c":["0.326928000","737.92333292"],"v":["13561580.19900979","70915525.06858009"],"p":["0.324423673","0.325413683"],"t":[3102,14819],"l":["0.320320000","0.317465100"],"h":["0.328000000","0.333809100"],"o":"0.327442700"}}}
Mientras que si se realiza una llamada al endpoint Ticker como https://api.kraken.com/0/public/Ticker?pair=1INCHEUR,1INCHUSD,AAVEAUD,AAVEETH,AAVEEUR,AAVEGBP,AAVEUSD,AAVEXBT,ADAAUD,ADAETH,ADAEUR,ADAGBP,ADAUSD,ADAUSDT,ADAXBT,ALGOETH,ALGOEUR,...,XDGUSD,XDGUSDT,XDGXBT,XLMAUD,XLMEUR,XLMGBP,XLMUSD,XLMXBT,XMREUR,XMRUSD,XMRXBT,XRPAUD,XRPCAD,XRPETH,XRPEUR,XRPGBP,XRPJPY,XRPUSD,XRPUSDT,XRPXBT,XTZAUD,XTZETH,XTZEUR,XTZGBP,XTZUSD,XTZXBT,YFIAUD,YFIETH,YFIEUR,YFIGBP,YFIUSD,YFIXBT,ZECEUR,ZECUSD,ZECXBT,ZRXEUR,ZRXGBP,ZRXUSD,ZRXXBT, se devolverán los datos del ticker actual para todos los mercados de Kraken actualmente disponibles (a 21 de agosto de 2021).