Start Spot Trading With Jupyter Notebook(Python)

1. What is Jupyter Notebook and How to Run Python Code?

Jupyter Notebook is an open-source, interactive web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text.

Learn More details about how to operate the Jupyter Notebook here

 

2. Where and how to install the BitMart Python SDK package? 

Install the BitMart SDK by inputting the following code into your Jupyter Notebook

Screenshot 2024-01-31 at 15.49.50.png

 

3. How to create API keys?

After signing in to BitMart, go to Account -> API Management

blobid1.png

4. Available Sections on BitMart SPOT API

There are several sections in BitMart Python SDK under REST API. Read BitMart API documentation about how to access the endpoints.

  • Public Market Data
  • Funding Account
  • Spot/Margin Trading
  • Margin Loan
  • Sub-Account

To import the Trade module, run the following code:

Screenshot 2024-01-31 at 15.51.01.png

5. How to Get Public Market Data?

Replace with your API access key, secret key, and memo, then execute
Please refer to the below code before requesting Public Market Data:

  • Currencies

Screenshot 2024-01-31 at 15.51.47.png

  • Symbols

Screenshot 2024-01-31 at 15.52.06.png

  • Latest Kline

Screenshot 2024-01-31 at 15.52.29.png

  • Depth

Screenshot 2024-01-31 at 15.52.49.png

6. How to Get the Spot Wallet Balance

Screenshot 2024-01-31 at 15.53.30.png

7. How to Place Spot Order (Limit Order or Market Order)

Screenshot 2024-01-31 at 15.53.47.png

8. How to Get Details of a Specific Order? 

  • Method 1: Request by Order ID

Screenshot 2024-01-31 at 15.54.13.png

  • Method 2: Request by Order Client ID

Screenshot 2024-01-31 at 15.54.29.png

9. How to Cancel Order 

  • Method 1: Cancel by Order ID

Screenshot 2024-01-31 at 15.54.44.png

  • Method 2: Cancel by Order Client ID

Screenshot 2024-01-31 at 15.55.13.png

10. How to Get History of orders

Screenshot 2024-01-31 at 15.55.45.png

11. Learn More BitMart API with Jupyter Notebook 

 

 

The BitMart Team

01/31/2024

Was this article helpful?

3 out of 6 found this helpful

Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.