Recent

Author Topic: A bot for auto-trading  (Read 10610 times)

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #15 on: March 30, 2020, 06:37:44 am »
Sorry for bringing this post back.

After writing the code for WebSocket communication, I also wrote the code for Public and Private HTTP(S) remote methods. So, I decided to merge both in the same project, adopting a new name: HyperX.

The code is available at: https://github.com/ezlage/HyperX
Contributions are welcome, specially to correct my English.

Thank you!
« Last Edit: March 30, 2020, 06:40:44 am by ezlage »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: A bot for auto-trading
« Reply #16 on: March 30, 2020, 01:48:45 pm »
I'm doing some drafts to create a "robot" for cryptocurrencies and stablecoins automatic trading.
I still do not see any trading logic, so I wonder what is your plan for that part? Do you plan to use plain fuzzy logic, use neural network for tuning fuzzy, or some other way?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #17 on: March 30, 2020, 02:11:37 pm »
What backend (exchange) are you implementing this for?
Also, not sure if you are still using the external program / pipes for Websockets but I stumbled on this library not too long ago (may be worth looking)

https://github.com/Warfley/LazWebsockets

I've also tossed the idea around releasing my trading engine which I've worled on (different iterations of course) for several years.

Would this be something you or others here would be interested in? I didn't get much attention when I released my coinbase pro library, so figured there weren't too many users here interested in trading cryptos.

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #18 on: March 30, 2020, 02:20:26 pm »
To add to my previous post, looking through your tester I see the poloniex url, not sure if the wss commands are common between other exchanges since I've really only worked with coinbase.

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #19 on: March 30, 2020, 07:00:22 pm »
Hello Avra! Hello mr-highball!

This code is only for communication with WebSocket and HTTP(s) APIs. The example included in the repository connects to Poloniex and is immediately able to use only three resources (websocket tickerData, public HTTP(s) tickerData method and private completeBalances method). But the intention of the class is to serve as a base for descendants that can wraps an Exchange completly, being able to use all resources and methods.

I'm starting to develop a wrapper for Poloniex, based on this class, later I will develop another wrappers for other Exchanges. Each wrapper will be able to call any remote methods, public or private, and parse the responses to a centralized base where the trading module will see and make decisions. The strategy will be on this trading module.

Obrigado!


mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #20 on: March 30, 2020, 07:12:52 pm »
You may have use in my ledger library in order to keep an offline record for holds, inventory, funds etc...
I use the "standard" ledger in my trading engine but it's templated so you could use records/objects if you want for more details. It allows me not to rely on account balance endpoints as well as letting me use partial funds for different products, and test offline (engine/strategy simulation)

https://github.com/mr-highball/ledger

Its thread safe and examples are found here,
https://github.com/mr-highball/ledger/blob/master/test/ledger_test.lpr
« Last Edit: March 30, 2020, 07:18:09 pm by mr-highball »

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #21 on: March 30, 2020, 07:46:17 pm »
mr-highball,

I took a look at all your repositories at GitHub. You have useful things there, that can replace all my work done until now. As I started this before being presented to your code, I finished the work until the current checkpoint.

You have code for JSON, threads and CoinBase that fits on my projects. I have to assume that my knowledge is very limited, so I need to check carefully and make sure that I will be able to understand and use it.

Thank you very much!

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #22 on: March 30, 2020, 07:48:18 pm »
You may have use in my ledger library in order to keep an offline record for holds, inventory, funds etc...
I use the "standard" ledger in my trading engine but it's templated so you could use records/objects if you want for more details. It allows me not to rely on account balance endpoints as well as letting me use partial funds for different products, and test offline (engine/strategy simulation)

https://github.com/mr-highball/ledger

Its thread safe and examples are found here,
https://github.com/mr-highball/ledger/blob/master/test/ledger_test.lpr

Nice! One more thing that fit and/or replace my work. I appreciative very much and I will check it. Thank you!

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #23 on: March 30, 2020, 07:48:56 pm »
Glad to help, I'll reach out via PM to hopefully give some pointers and maybe collaborate with some other exchanges.
« Last Edit: March 30, 2020, 07:57:48 pm by mr-highball »

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #24 on: March 30, 2020, 07:54:06 pm »
mr-highball

About releasing the code, I think that is very positive.

I will make my code available, except the part of the strategies and profit seeking. Because many users using the same strategy can turn it nonviable.

Tony Stone

  • Full Member
  • ***
  • Posts: 216
Re: A bot for auto-trading
« Reply #25 on: April 30, 2021, 02:13:01 am »
I am absolutely interested in some libraries I can use to connect to different crypto exchanges and maybe execute trades... I will look through your github and see what you have.  Thanks!


Would this be something you or others here would be interested in? I didn't get much attention when I released my coinbase pro library, so figured there weren't too many users here interested in trading cryptos.

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #26 on: April 30, 2021, 03:34:28 am »
Tony, I've released my code and UI and have a discussion page with releases here,
https://github.com/mr-highball/simplebot-support

Good luck trading 👍

ezlage

  • Guest
Re: A bot for auto-trading
« Reply #27 on: April 30, 2021, 05:37:31 pm »
Hello, Guys!

Mr-highball did a really good job, named by him as "simplebot". He did some other useful things, like libs for threading, json and gdax.

So, Tony Stone, you can take a look here: https://github.com/mr-highball.

I'm still working on my own project. I decided to develop a suite for algorithmic, automated and perhaps manual trading too, allowing me to connect to any Exchange (developing a specific wrapper and parser, of course) and to create my own strategies (i.e. support for strategies development).

I attached the current schematic and a connection test. I'm almost finishing the first module, with a wrapper and a parser for Poloniex. All code will be available, except my strategies (each one can develop their own strategies). My knowledge is limited, so I'm learning during the process and adjusting the idea/project as needed.

You can track everything here:

https://github.com/ezlage/EZRA (all the modules below together plus the user interface, not yet started)
https://github.com/ezlage/HyperX (almost finished, but it is possible to use right now - take a look at the screenshot)
https://github.com/ezlage/xLedger (I will start to develop it soon)
https://github.com/ezlage/Hazard (I will start to develop it soon)

The entire process will take a long long time!

Tony Stone

  • Full Member
  • ***
  • Posts: 216
Re: A bot for auto-trading
« Reply #28 on: May 06, 2021, 04:48:31 am »
This is awesome stuff Mr Highball!  I have spent the past few days of my free tinkering time doing reading about different web technolgies available for Lazarus... My initial goal was to make a very simple trading terminal for Binance and Coinbase.  My programming skill is extremley beginner so I have had a lot of trouble getting a basic interface functioning the way I thought.  But either way I am following your projects on Github now!  If I ever get good at this stuff I would be willing to contribute to your projects on Github!

mr-highball

  • Full Member
  • ***
  • Posts: 233
    • Highball Github
Re: A bot for auto-trading
« Reply #29 on: May 06, 2021, 05:05:35 am »
Thank you  :-[
The idea for the trading code was to allow for multiple backends. Although the UI is written around cb pro, the engine is exchange agnostic, so if you were to write a binance (or kraken... or anything) client library, adapter interfaces could be written to utilize this and support multiple exchanges (even arbitrage if desired) fairly easily. I've been happy with cb pro but I fully realize there are other exchanges that offer different coins as well as different level KYC requirements (and fee tiers...).

PR'S are fully welcome and discussions on the github repo are as well (ask questions and I'll be glad to help where possible) :D

 

TinyPortal © 2005-2018