Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

PrimeTrade.ai - Binance Futures Testnet Trading Bot

A simplified Python application that places MARKET and LIMIT orders on the Binance Futures Testnet (USDT-M).

Features

  • Place Market and Limit orders (BUY/SELL).
  • Validates user input via an enhanced CLI built with typer and rich.
  • Separated bot logic (API client, validators, orders logic) and CLI layer.
  • Comprehensive file logging (trading_bot.log).

Prerequisites

  • Python 3.8+
  • Binance Futures Testnet Account

Setup Steps

  1. Clone/Download the repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. API Credentials Included:
    • For ease of testing by the reviewers, a .env file containing valid Binance Futures Testnet API keys is already included in this repository. You do not need to configure anything else—the bot is ready to run immediately!

How to Run Examples

Use the cli.py script to place orders. The CLI provides a clear, formatted summary of your request and the API response.

1. Place a MARKET Order

To place a MARKET order (e.g., BUY 0.01 BTCUSDT):

python cli.py trade BTCUSDT BUY MARKET 0.01

2. Place a LIMIT Order

To place a LIMIT order, you must provide the --price (or -p) option. For example, to place a SELL LIMIT order for 0.01 BTCUSDT at $60,000:

python cli.py trade BTCUSDT SELL LIMIT 0.01 --price 60000

Assumptions

  • Uses Binance Futures Testnet base URL.
  • Time in force for LIMIT orders is hardcoded to GTC (Good Till Cancelled).
  • Output focuses on the requested specific fields (orderId, status, executedQty, avgPrice).

File Structure

  • bot/client.py: The Binance API wrapper for Testnet.
  • bot/validators.py: Data validation rules.
  • bot/orders.py: Order execution layer linking validators and client.
  • bot/logging_config.py: File and console logging setup.
  • cli.py: The command-line interface entry point.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages