• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer

iKomodo P2P

Peer to Peer News

AtomicDEX Orderbook Tutorial
  • 1st Web Story
  • News Relay
  • Applications
  • Podcasts
  • Videos
  • About Us

How to use HitBTC public api – example price, pair & volume

May 18, 2019 by Ahmed Shah

Today we will review how to use HitBTC public API to get the price, market data for use in your market maker-in-a-box or a secure trustless oracle for price feeds, like one in testing at Komodo. The market currently has more than 700 coins listed to trade from. This means you can get pricing data of every popular cryptocurrency in the world.

Check out our cryptocurrency wallet getting started articles.

Getting Prices with HitBTC API

There can be a lot of functions that can be achieved using the public API of HitBTC. We can get the latest market prices, get market limits and even deposit or withdraw from our CEX accounts. To get custom and advanced market data it will require authenticated APIs with API keys.

https://api.hitbtc.com/api/2/public/ticker/ETHBTC

This API endpoint URL returns the current market price for BTC and ETH pair returning a JSON data like this,

JSON Response Example:

{
  "ask": "0.030488",
  "bid": "0.030487",
  "last": "0.030487",
  "open": "0.031790",
  "low": "0.030424",
  "high": "0.031834",
  "volume": "75801.4510",
  "volumeQuote": "2366.3425029031",
  "timestamp": "2019-04-24T01:41:00.233Z",
  "symbol": "ETHBTC"
}

Public API for other market pairs

We can get more and different price data for different markets by just simply editing the coin pairs which is called a parameter in the API endpoint. We will get BTC/KMD, BTC/LTC, BTC/BCH like this.

BTC to KMD Endpoint: https://api.hitbtc.com/api/2/public/ticker/KMDBTC

JSON Response Example:

{
  "ask": "0.00018699",
  "bid": "0.00018625",
  "last": "0.00018691",
  "open": "0.00020104",
  "low": "0.00018578",
  "high": "0.00020144",
  "volume": "116171.5",
  "volumeQuote": "22.386307664",
  "timestamp": "2019-04-24T01:41:55.825Z",
  "symbol": "KMDBTC"
}

BTC to LTC Endpoint: https://api.hitbtc.com/api/2/public/ticker/LTCBTC

JSON Response Example:

{
  "ask": "0.0131614",
  "bid": "0.0131429",
  "last": "0.0131437",
  "open": "0.0142510",
  "low": "0.0128523",
  "high": "0.0143290",
  "volume": "584901.901",
  "volumeQuote": "8113.7049880954",
  "timestamp": "2019-04-24T01:42:19.236Z",
  "symbol": "LTCBTC"
}


BTC to BCH Endpoint: https://api.hitbtc.com/api/2/public/ticker/BCHBTC

JSON Response Example:

{
  "ask": "0.061494",
  "bid": "0.061330",
  "last": "0.061372",
  "open": "0.064887",
  "low": "0.060848",
  "high": "0.066511",
  "volume": "26.8784",
  "volumeQuote": "1.7347668728",
  "timestamp": "2019-04-24T01:43:05.532Z",
  "symbol": "BCHBTC"
}

Advanced API Key Functions

More advanced API endpoints are used with API key in headers or API endpoint.The pricing API used or ticker information is public and do not require secure API key or signup.This data can be used anywhere in your bots, softwares, websites because this data is real time and dynamic which you can feed to your programs.  You can find the API’s on https://api.hitbtc.com/ .

 

Filed Under: APIs Tagged With: CEX, price data, tutorial

Primary Sidebar

  • GitHub
  • Pinterest
  • Twitter

Atomic Swaps For Dummies

The atomic swap infographic explains how the network negotiates the exchange between two users directly P2P!

atomic swaps for dummies - ikomodo infographic

More to See

electrum server load summary

Electrum Server Load During AtomicDEX Stress Test

December 15, 2020 By iKomodo Mylo

Blockchain Dev Kit v1, Electrumx & DEX in 1 hour

August 6, 2020 By iKomodo Mylo

Portable WASM Smart Contracts

June 10, 2020 By iKomodo Mylo

AtomicDEX Orderbook Tutorial – Part 2

May 1, 2020 By iKomodo Mylo

Verus Crypto Mining & Staking Wallet With Blockchain ID – Part 1

April 14, 2020 By Ahmed Shah

Convert Private Key To Bitcoin Private Key

April 21, 2020 By iKomodo Mylo

AtomicDEX Orderbook Tutorial – Part 1

April 30, 2020 By iKomodo Mylo

About atomicDEX orderbook

April 13, 2020 By iKomodo Mylo

Vote Mylo Notary Node Election 2020

Notary Node Election 2020

April 10, 2020 By iKomodo Mylo

TORUS OAuth dApp Authentication

January 6, 2020 By Ahmed Shah

Easily view your crypto wallet with Opera Touch menu

Kyber Swap Review with Opera Touch Crypto Wallet

December 19, 2019 By iKomodo Mylo

Tags

atomic swap Binance browser cdp CEX collaboration collateralized collectibles community composer demo dex dexp2p docker dpow efficiency ethereum gaming gas fees interview iPad listing marketmaker MetaMask mining nft opera touch polkadot presentation price data Proxy Token redfox smartchain stablecoin streaming support synthetic team member trading trading fees tutorial wallet waves webapp whitelabel

Developer API Examples

Atomic Swap API released by Komodo

August 13, 2019 By iKomodo Mylo

Using Insomnia to Get API Data

June 4, 2019 By Ahmed Shah

How To Get Historical Price Data from CoinLayer

June 4, 2019 By Ahmed Shah

How to Get Price Data from Binance

May 27, 2019 By Ahmed Shah

How to use HitBTC public api – example price, pair & volume

May 18, 2019 By Ahmed Shah

How to Get Price Data from BITTREX

May 3, 2019 By Ahmed Shah

How to get Price Index API from Bitcoin Average

April 23, 2019 By Ahmed Shah

Footer

About iKomodo P2P News

A news site for updates in the Komodo Platform P2P ecosystem. This is a Coin Gateways Blockchain Lab blog.

Recent

  • Electrum Server Load During AtomicDEX Stress Test
  • Blockchain Dev Kit v1, Electrumx & DEX in 1 hour
  • Portable WASM Smart Contracts
  • AtomicDEX Orderbook Tutorial – Part 2
  • AtomicDEX Orderbook Tutorial – Part 1

Search

Tags

atomic swap Binance browser cdp CEX collaboration collateralized collectibles community composer demo dex dexp2p docker dpow efficiency ethereum gaming gas fees interview iPad listing marketmaker MetaMask mining nft opera touch polkadot presentation price data Proxy Token redfox smartchain stablecoin streaming support synthetic team member trading trading fees tutorial wallet waves webapp whitelabel

Copyright © 2021 · Magazine Pro on Genesis Framework · WordPress · Log in