Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

OmniTrade

OmniTrade is a modular and extensible platform designed to integrate with multiple cryptocurrency exchanges.
It supports authentication, account information, balances, open positions, and order history.
The architecture is built to serve as the foundation for an AI-driven trading system.


πŸš€ Purpose

The main goals of this project are:

  • βœ… Centralize integration with multiple crypto exchanges.
  • βœ… Provide a unified interface for accessing accounts, balances, positions, and orders.
  • βœ… Enable future implementation of AI-based trading logic.
  • βœ… Be secure, modular, and easy to maintain.

🧠 Architecture Overview

src/
β”œβ”€β”€ core/
β”‚ └── ExchangeManager.ts # Main class to manage exchanges
β”œβ”€β”€ providers/
β”‚ └── MercadoBitcoinProvider.ts # Implementation for Mercado Bitcoin
β”œβ”€β”€ config/
β”‚ └── index.ts # Environment config loader
β”œβ”€β”€ types/ # Type interfaces
β”œβ”€β”€ index.ts # Entry point

βœ… Current Status

Feature Status
Mercado Bitcoin Integration βœ…
Fetching Accounts βœ…
Fetching Balances βœ…
Fetching Positions πŸ”„ In Progress
Fetching Orders πŸ”„ In Progress
Binance Integration πŸ”² Planned
AI Trading Logic (API) πŸ”² Planned

βš™οΈ Installation

  1. Clone the repository:
git clone https://github.com/raphaelvserafim/omnitrade.git
  1. Navigate into the folder:
cd omnitrade
  1. Install dependencies:
npm install

πŸ” Configuration

Create a .env file in the root directory and set your credentials:

MB_CLIENT_ID=your_client_id
MB_CLIENT_SECRET=your_client_secret

These are loaded in the config module.


πŸ§ͺ Running the Project

Using tsx:

npx tsx index.ts

Using ts-node:

npx ts-node index.ts

πŸ” Example Usage

const MBProvider = new MercadoBitcoinProvider(clientId, clientSecret);
const authenticate = await MBProvider.authenticate();
 if (!authenticate) {
 console.log("Authentication failed");
 return;
 }
console.log("Authentication successful", authenticate.access_token);
 
MBProvider.setAccessToken(authenticate.access_token);
const manager = new ExchangeManager(MBProvider);
console.log(manager.getExchangeName());
const accounts = await manager.fetchAllAccounts();
console.dir(accounts, { depth: null });
const balances = await manager.fetchAllBalances();
console.dir(balances, { depth: null });

βž• Adding New Exchanges

  1. Create a new file in src/providers (e.g., BinanceProvider.ts)
  2. Implement the IExchangeProvider interface
  3. Inject the provider into ExchangeManager

πŸ—ΊοΈ Roadmap

  • Authentication for Mercado Bitcoin
  • Account and balance fetching
  • Position and order fetching
  • Binance, KuCoin, OKX support
  • AI integration (e.g., TensorFlow.js, GPT API)
  • Web dashboard

πŸ“œ License

MIT Β© Raphael Serafim


🀝 Contributing

Pull requests are welcome.
Please open an issue to discuss major changes or improvements.

About

OmniTrade is a modular and extensible platform designed to integrate with multiple cryptocurrency exchanges.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /