@coinset/zaif
Version:
Zaif API client for Node.js
3 lines (2 loc) • 1.29 kB
JavaScript
var s="https://api.zaif.jp/api/1/",i="currencies",n="currency_pairs",c="last_price",a="ticker",m="trades",u="depth";import f from"node-fetch";var p=async(e,r,t)=>{let o=await f(e,r);if(!o.ok)throw Error(o.statusText);let y=await o.text();return JSON.parse(y,t?.parseJson)};import{join as h}from"path";var L=({pair:e},r)=>{let t=new URL(h(a,e),s);return p(t,r)};import{join as P}from"path";var U=({symbol:e},r)=>{let t=new URL(P(i,e),s);return p(t,r)};import{join as _}from"path";var g=({pair:e},r)=>{let t=new URL(_(m,e),s);return p(t,r)};import{join as b}from"path";var N=({pair:e},r)=>{let t=new URL(b(n,e),s);return p(t,r)};import{join as R}from"path";var Y=({pair:e},r)=>{let t=new URL(R(u,e),s);return p(t,r)};import{join as d}from"path";var W=({pair:e},r)=>{let t=new URL(d(c,e),s);return p(t,r)};var $=["ncxc_btc","cicc_jpy","jpyz_jpy","btc_jpy","xcp_btc","zaif_jpy","erc20.cms_jpy","xym_btc","mona_btc","zaif_btc","bch_btc","eth_jpy","eth_btc","bch_jpy","mosaic.cms_btc","xem_btc","fscc_btc","cicc_btc","xcp_jpy","xym_jpy","mosaic.cms_jpy","fscc_jpy","xem_jpy","erc20.cms_btc","ncxc_jpy","mona_jpy"];export{$ as ALL_ZAIF_PAIRS,U as fetchCurrencies,N as fetchCurrencyPairs,Y as fetchDepth,W as fetchLastPrice,L as fetchTicker,g as fetchTrades};
//# sourceMappingURL=index.es.js.map