• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Apps
    • Blockchain Identity
    • Collateralized Debt Positions
    • Blockchain Loans
    • Cryptocurrency Trading
    • Cryptocurrency Wallets
    • Stablecoin
  • CEX
    • CEX Resources
  • DEX
    • DEX Resources
    • DEX Reviews
  • Asset Tokens
    • Collectibles
    • Supply Chain
  • Developers
    • APIs
    • Tutorial

Hybrid DEX

Digital Currency Applications

How to Get Price Data from Binance

May 27, 2019 by Ahmed Shah

Today we will review how to use Binance public API to get the price, market data for use in your marketmaker-in-a-box or a secure trustless oracle for price feeds, like one in testing at Komodo. Binance is currently the largest cryptocurrency CEX (Centralized Exchange) in the world. This means you can get pricing data of every popular cryptocurrency in the world.

Getting Prices with APIs

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

https://api.binance.com/api/v3/ticker/price?symbol=ETHBTC

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

Response Example:

{
  "symbol": "ETHBTC",
  "price": "0.02999500"
}

Getting More Prices:

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.binance.com/api/v3/ticker/price?symbol=KMDBTC

Response Example:

{
  "symbol": "KMDBTC",
  "price": "0.00019140"
}

BTC to LTC Endpoint: https://api.binance.com/api/v3/ticker/price?symbol=LTCBTC

Response Example:

{
  "symbol": "LTCBTC",
  "price": "0.01352400"
}

BTC to DASH Endpoint: https://api.binance.com/api/v3/ticker/price?symbol=DASHBTC

Response Example:

{
  "symbol": "DASHBTC",
  "price": "0.02074400"
}

The pricing API used or ticker information is public and does not require secure API key or signup. This data can be used anywhere in your bots, software, websites because this data is real-time and dynamic which you can feed to your programs. More advanced API data can be retrieved which uses API key in headers or API endpoint, the signup process is required.  You can find the API’s Documentation on https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md

 

Filed Under: APIs, CEX Resources, Tutorial Tagged With: Binance

Primary Sidebar

Tags

atomic swap Binance Bittrex browser ethereum gas fees historical HitBTC insomnia komodo Listing Market Index marketmaker marketplace MetaMask Pegged Price Index Proxy Token support tools trading fees waves webapp

Categories

Latest API News

Atomic Swap API released by Komodo

More APIs

  • How To Get Historical Price Data from CoinLayer
  • How to Get Price Data from Binance
  • How to use HitBTC public api – example price, pair & volume
  • How to Get Price Data from BITTREX
  • How to get Price Index API from Bitcoin Average

Footer

Hybrid DEX

Hybrid DEX news site is for all related information to DEX technology.

Writing articles is open to the public with some guidelines.  Community content may be imported to other sources, and all attribution follows creative commons licensing.

Recent

  • Create A Storefront On OpenSea & Sell Items Guide December 13, 2019
  • What is OpenSea Collectibles Marketplace December 6, 2019
  • DEX Listing Howto & Bitcoin Cash Pegged Token October 18, 2019
  • Atomic Swap API released by Komodo August 13, 2019
  • Using Insomnia to Get API Data June 4, 2019
  • How To Get Historical Price Data from CoinLayer June 4, 2019
  • ETHFINEX Review June 3, 2019
  • How to Get Price Data from Binance May 27, 2019

Search

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