Quickstart
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, Google Colab, etc will work.
How to get API Key
-
Enter the login/signup page.
-
If you have a Gmail account, you can log in directly. If you wish to sign up with another email hosting service, please click the "Create an account" button to enter the sign-up process first.
-
After logging in, you can view your Maxi API Key by clicking the profile button in the top right corner.
-
Depending on your preferred data acquisition method, please follow the documentation for either the REST API or the Python SDK.
Use DataMaxi+ in Python
Please find below a simple example which fetches the recent 1 month candle data of Bitcoin on Binance.
# Import Datamaxi package
from datamaxi.datamaxi import Datamaxi
# Fetch the candle data
maxi = Datamaxi(api_key=API_KEY)
exchange = "binance"
symbol = "BTC-USDT"
interval = "1M"
candle_data = maxi.candle(exchange=exchange, symbol=symbol, interval=interval)
# Specify the file name
file_name = f'{exchange}_{symbol}_{interval}_candles.csv'
candle_data.to_csv(file_name, index=False)
print(f'Data saved to {file_name}')
Here is an example which fetches the Naver search trend data.
from datamaxi.naver import Naver
# Lets define what data sets we want to get
naver = Naver(api_key=API_KEY)
# Lets check what symbols we can use
print(naver.symbols())
# Now lets check get trend data for BTC
naver.trend("BTC")