Skip to main content

Python SDK quickstart

For comprehensive documentation and usage details of the Python SDK, visit bisonai/datamaxi-python.

Requirements​

info
  • Python 3.8 or onwards.
  • Access to PIP package manager
tip
  • If you are not sure of your Python version, you can check it with the command python --version.
  • Common Python IDE such as Jupyter Notebook, Visual Studio Code, PyCharm, or Google Colab will work.

Installation​

pip3 install datamaxi

CEX candle data​

The maxi.cex.candle() method requires a DataMaxi+ API key. Copy your API key from My page → API keys (open); see the Quick start.

from datamaxi.datamaxi import Datamaxi

# Initialize the Datamaxi client with your API key
api_key = "YOUR_API_KEY"
maxi = Datamaxi(api_key=api_key)

# Retrieve a list of available CEX exchanges supported by the Datamaxi client
exchanges = maxi.cex.candle.exchanges()

# Retrieve a list of supported time intervals for CEX candle data
intervals = maxi.cex.candle.intervals()

# Retrieve a list of symbols available for CEX candle data on the Datamaxi client
symbols = maxi.cex.candle.symbols()

# Fetch recent CEX candle data for a specific trading pair from an exchange
# - exchange: Name of the exchange (e.g., "binance")
# - symbol: Trading pair symbol (e.g., "BTC-USDT")
# - interval: Time interval for each candle (e.g., "1m" for 1 minute)
candle, get_next = maxi.cex.candle(exchange="binance", market="spot", symbol="BTC-USDT", interval="1m")
# One call returns up to 1,000 candles; candle history starts on 2024-01-01.

The naver.trend() method requires a DataMaxi+ API key. Copy your API key from My page → API keys (open); see the Quick start.

from datamaxi.naver import Naver

# Initialize the Naver client with an API key to access data
api_key = "YOUR_API_KEY"
naver = Naver(api_key=api_key)

# Retrieve and display available symbols for data retrieval
print(naver.symbols())

# Fetch and display trend data specifically for Bitcoin (BTC)
naver.trend("BTC")