[Intro] Trading Assistant Bot for Bitfinex
Repository
https://github.com/imwatsi/trader-bfx-backend
Introduction
Markets are a vital part of the cryptocurrency economy and exchanges provide platforms for price discovery and liquidity for the cryptocurrencies involved. I've been interested in crypto markets since discovering crypto in general and over time I noticed a need for customized features to aid the trading experience.
These could be features missing from the web interfaces provided by the exchanges, or just small things tailored to personal tastes. Whatever the need, trading platforms have API interfaces that you can use to create apps that do what you want them to do.
![trading-643723_1280.jpg](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmX9DbNo5yGDSUUL7Z6pAM4ms81JaLoS9np2yeQHAZAcpW/trading-643723_1280.jpg)
image from Pixabay
This blog post introduces a project that I have started working on: a trading assistant bot for use with the Bitfinex exchange. As I develop my project, I will open source the basic frameworks so that anyone can have a good starting point in creating their own customized bot.
Why Bitfinex? Bitfinex was one of the earliest exchanges in the space and has quite an advanced trading experience. It has a good API that you can use to create custom trading bots. They also have many useful open source libraries (I found the one for technical analysis very useful).
Roadmap
The first iterations of the app will be backend-focused, dealing mainly with data collection and manipulation: connecting to the API, importing market data, performing technical analysis, etc. The backend code will be written in Python.
In later iterations, once a firm base is established, focus will be turned to the frontend, with features that help create a personalized trading experience. I will probably make a couple of UI templates that can be customized at will. The specific programming languages used at this stage will be decided and then disclosed in future updates.
The repository linked with this post is for the backend, written in Python.
![plan-2372176_1280.jpg](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmUSkVhFU2fYPvFR6QkQw8mUXVbhRmFg926LmAj8FfSCta/plan-2372176_1280.jpg)
image from Pixabay
The Backend
I chose to create a custom API handling module instead of adopting one of the code libraries availed by Bitfinex. This is because I needed more control over the code structure for future development plans I have. Using one of the libraries would have affected the structure of my code.
The backend will consist of the following modules of functionality (in order of importance):
(work in progress)
API connection (REST and Websocket implementations)
- Use websocket connection for realtime market data (using version 2 of the Bitfinex API)
- Implement authentication for access to account data and trading
Market data import and state maintenance
- Candles (multiple timeframes)
- Order book (aggregated)
- Trades
- Support for multiple markets
Account data import and state maintenance
- Orders (active, historical)
- Positions (active, closed)
- Trades (realtime, historical)
- Wallets (currencies, balances)
- Margin Information
- Entire Account Balance Info
- Account Notifications
Technical analysis (TA)
- Use the Bitfinex open source library for technical analysis
- Provide code to implement various TA techniques
Alerts system
- Technical indicator based alerts
- Price alerts
- ... more types of alerts to be decided later
Order placement
- Code base for performing various types of trades supported by Bitfinex
- Simple strategy implementations
Current status
DONE:
- Basic API websocket connection
- Subscriptions to basic market data channels: candles
WHAT I'M WORKING ON NOW:
- Parsing raw candle data from the API into workable Python objects
- Code to handle channel updates and maintain accurate candle data states
Thank you for providing information about your creation. It's really a great work in progress. The list of functions shows the bot will have good abilities when 100% done. I am Crypto, and Fx trader, thus, I understand the stress it is to trade with bunches of technicals. Sometimes, I trade based on fundamentals just to avoid the stress. I'll be happy if you continue to provide updates as you proceed in the development.
Thank you!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
[utopian-moderator]
Thanks for the review @tykee! I’m glad you can relate to the issues I’m trying to solve. :)
Absolutely! :)
Thank you for your review, @tykee! Keep up the good work!
Hi @imwatsi!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Hey, @imwatsi!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!