Skip to content

Binance API wrapper in Python. Currently a work in progress. Public endpoints only.

Notifications You must be signed in to change notification settings

markx3/binanceapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Binance API wrapper

This is a work in progress Binance API wrapper. As of now, you can use it to access Binance's public endpoints.

Requirements

  • requests

Example

Let's say you're interested in getting candlesticks data for BTCUSDT pair on Binance. You want to work with 5-minute interval candles, with a maximum amount of 2 candles in your analysis. Here's what you need to do:

api = Api()
klines = api.klines(symbol="BTCUSDT", interval="5m", limit=2)

Inspecting klines, you would get:

[  
   [  
      1527403500000,
      "7291.08000000",
      "7293.65000000",
      "7277.70000000",
      "7289.54000000",
      "68.23215800",
      1527403799999,
      "497165.85993717",
      1311,
      "36.40716700",
      "265274.27469882",
      "0"
   ],
   [  
      1527403800000,
      "7287.11000000",
      "7289.54000000",
      "7281.23000000",
      "7288.38000000",
      "4.93415000",
      1527404099999,
      "35951.85631080",
      737,
      "4.00030500",
      "29151.86755480",
      "0"
   ]
]

More info

For more info please refer to Binance Official API Docs.

About

Binance API wrapper in Python. Currently a work in progress. Public endpoints only.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages