Zaif crypto exchange

Comment

Author: Admin | 2025-04-27

('BTC/USD', 1, 10, { 'type': 'trailing-stop' })}) ();ESM//esm exampleimport {version, binance} from 'ccxt';console.log(version);const exchange = new binance();const ticker = await exchange.fetchTicker('BTC/USDT');console.log(ticker);Python# coding=utf-8import ccxthitbtc = ccxt.hitbtc({'verbose': True})bitmex = ccxt.bitmex()huobipro = ccxt.huobipro()exmo = ccxt.exmo({ 'apiKey': 'YOUR_PUBLIC_API_KEY', 'secret': 'YOUR_SECRET_PRIVATE_KEY',})kraken = ccxt.kraken({ 'apiKey': 'YOUR_PUBLIC_API_KEY', 'secret': 'YOUR_SECRET_PRIVATE_KEY',})exchange_id = 'binance'exchange_class = getattr(ccxt, exchange_id)exchange = exchange_class({ 'apiKey': 'YOUR_API_KEY', 'secret': 'YOUR_SECRET',})hitbtc_markets = hitbtc.load_markets()print(hitbtc.id, hitbtc_markets)print(bitmex.id, bitmex.load_markets())print(huobipro.id, huobipro.load_markets())print(hitbtc.fetch_order_book(hitbtc.symbols[0]))print(bitmex.fetch_ticker('BTC/USD'))print(huobipro.fetch_trades('LTC/USDT'))print(exmo.fetch_balance())# sell one ฿ for market price and receive $ right nowprint(exmo.id, exmo.create_market_sell_order('BTC/USD', 1))# limit buy BTC/EUR, you pay €2500 and receive ฿1 when the order is closedprint(exmo.id, exmo.create_limit_buy_order('BTC/EUR', 1, 2500.00))# pass/redefine custom exchange-specific order params: type, amount, price, flags, etc...kraken.create_market_buy_order('BTC/USD', 1, {'trading_agreement': 'agree'})PHP true));$quoinex = new \ccxt\quoinex ();$zaif = new \ccxt\zaif (array ( 'apiKey' => 'YOUR_PUBLIC_API_KEY', 'secret' => 'YOUR_SECRET_PRIVATE_KEY',));$hitbtc = new \ccxt\hitbtc (array ( 'apiKey' => 'YOUR_PUBLIC_API_KEY', 'secret' => 'YOUR_SECRET_PRIVATE_KEY',));$exchange_id = 'binance';$exchange_class = "\\ccxt\\$exchange_id";$exchange = new $exchange_class (array ( 'apiKey' => 'YOUR_API_KEY', 'secret' => 'YOUR_SECRET',));$poloniex_markets = $poloniex->load_markets ();var_dump ($poloniex_markets);var_dump ($bittrex->load_markets ());var_dump ($quoinex->load_markets ());var_dump ($poloniex->fetch_order_book ($poloniex->symbols[0]));var_dump ($bittrex->fetch_trades ('BTC/USD'));var_dump ($quoinex->fetch_ticker ('ETH/EUR'));var_dump ($zaif->fetch_ticker ('BTC/JPY'));var_dump ($zaif->fetch_balance ());// sell 1 BTC/JPY for market price, you pay ¥ and receive ฿ immediatelyvar_dump ($zaif->id, $zaif->create_market_sell_order ('BTC/JPY', 1));// buy BTC/JPY, you receive ฿1 for ¥285000 when the order closesvar_dump ($zaif->id, $zaif->create_limit_buy_order ('BTC/JPY', 1, 285000));// set a custom user-defined id to your order$hitbtc->create_order ('BTC/USD', 'limit', 'buy', 1, 3000, array ('clientOrderId' => '123'));">include 'ccxt.php';$poloniex = new \ccxt\poloniex ();$bittrex = new \ccxt\bittrex (array ('verbose' => true));$quoinex = new \ccxt\quoinex ();$zaif = new \ccxt\zaif (array ( 'apiKey' => 'YOUR_PUBLIC_API_KEY', 'secret' => 'YOUR_SECRET_PRIVATE_KEY',));$hitbtc = new \ccxt\hitbtc (array ( 'apiKey' => 'YOUR_PUBLIC_API_KEY', 'secret' => 'YOUR_SECRET_PRIVATE_KEY',));$exchange_id = 'binance';$exchange_class = "\\ccxt\\$exchange_id";$exchange = new $exchange_class (array ( 'apiKey' => 'YOUR_API_KEY', 'secret' => 'YOUR_SECRET',));$poloniex_markets = $poloniex->load_markets ();var_dump ($poloniex_markets);var_dump ($bittrex->load_markets ());var_dump ($quoinex->load_markets ());var_dump ($poloniex->fetch_order_book ($poloniex->symbols[0]));var_dump ($bittrex->fetch_trades ('BTC/USD'));var_dump ($quoinex->fetch_ticker ('ETH/EUR'));var_dump ($zaif->fetch_ticker ('BTC/JPY'));var_dump ($zaif->fetch_balance ());// sell 1 BTC/JPY for market price, you pay ¥ and receive ฿ immediatelyvar_dump ($zaif->id, $zaif->create_market_sell_order ('BTC/JPY', 1));// buy

Add Comment