Giter Site home page Giter Site logo

fremantle-industries / tai Goto Github PK

View Code? Open in Web Editor NEW
449.0 449.0 74.0 6.02 MB

A composable, real time, market data and trade execution toolkit. Built with Elixir, runs on the Erlang virtual machine

License: MIT License

Elixir 100.00%
algorithmic-trading automated-trading bitcoin crypto-trader crypto-trading crypto-trading-bot cryptocurrency cryptocurrency-trader cryptocurrency-trading-bot derivatives fintech hft hft-trading investment quant quantitative-finance trading trading-bot trading-systems

tai's People

Contributors

chrism2671 avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar renovate-bot avatar rupurt avatar yurikoval avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tai's Issues

start error

I got the following error when executing the run command : elixir --sname tai -S mix run --no-halt
OS: Mac
Elixir version: Elixir 1.7.3 (compiled with Erlang/OTP 21)

** (Mix) Could not start application echo_boy: EchoBoy.start(:normal, []) returned an error: shutdown: failed to start child: {:ranch_listener_sup, EchoBoy.Router.HTTP}
    ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
        ** (EXIT) :badarg
{"log":"Application echo_boy exited: EchoBoy.start(:normal, []) returned an error: shutdown: failed to start child: {:ranch_listener_sup, EchoBoy.Router.HTTP}\n    ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup\n        ** (EXIT) :badarg","logging.googleapis.com/sourceLocation":{"file":"application_controller.erl","line":1935,"function":"application_controller.info_exited/3"},"severity":"INFO","time":"2018-12-13T18:49:50.723Z"}

Questions

Hey. First of all, thanks for a great library :)

I'm going to experiment with it, but before want to ask some questions

  • Are you use it in production?
  • Are there any possibilities for backtesting?
  • How is it handles rate limiting?
  • Any plans for Dead men's switch functionality or is it possible to implement is as an advisor?

Best,
Ihor

(FunctionClauseError) no function clause matching in Tai.VenueAdapters.Bitmex.Stream.RouteOrderBooks.handle_cast/2

Hey @rupurt.
I'm using tai for data mining and recently I was faced with an error.
Any clues?

lib/tai/venue_adapters/bitmex/stream/route_order_books.ex in Tai.VenueAdapters.Bitmex.Stream.RouteOrderBooks.handle_cast/2 at line 30
(FunctionClauseError) no function clause matching in Tai.VenueAdapters.Bitmex.Stream.RouteOrderBooks.handle_cast/2

arg 0:
{%{"action" => "partial", "attributes" => %{"id" => "sorted", "symbol" => "parted"}, "data" => [%{"id" => 33399985065, "price" => 7467.5, "side" => "Sell", "size" => 842, "symbol" => "XBTZ19"}, %{"id" => 33399985066, "price" => 7467, "side" => "Sell", "size" => 36004, "symbol" => "XBTZ19"}, %{"id" => 33399985067, "price" => 7466.5, "side" => "Sell", "size" => 92, "symbol" => "XBTZ19"}, %{"id" => 33399985068, "price" => 7466, "side" => "Sell", "size" => 182502, "symbol" => "XBTZ19"}, %{"id" => 33399985069, "p

arg1:
%Tai.VenueAdapters.Bitmex.Stream.RouteOrderBooks.State{stores: %{"XBTUSD" => Tai.VenueAdapters.Bitmex.Stream.ProcessOrderBook_bitmex_XBTUSD, "XBTZ19" => Tai.VenueAdapters.Bitmex.Stream.ProcessOrderBook_bitmex_XBTZ19}, venue_id: :bitmex}

Manage orders in separate process to caller

Currently orders are managed by the caller process. This has the limitation that orders cannot be updated once that process is terminated.

For example:

When an advisor cancels an order in the on_terminate callback
Then the order should be sent to the venue and updated within the OrderStore
But the async task terminates early and never sends the order to the venue

iex -S mix hangs on 'generate tai app'

hi,
It seems that the quickstart you have in your readme doesnt work as intended; it seems like the app hangs indefinitely, I never get the interactive shell back.

awaitfuture@DESKTOP-ICGEU3C:~/elixir_projects/tai$ iex -S mix
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]

==> tai
Compiling 287 files (.ex)
warning: function EchoBoy.Config.port/0 is undefined (module EchoBoy.Config is not available)
  lib/tai/venue_adapters/mock/stream_supervisor.ex:37

Generated tai app
==> tai
Compiling 1 file (.ex)
warning: redefining module Tai (current version loaded from _build/dev/lib/tai/ebin/Elixir.Tai.beam)
  lib/tai.ex:1

Generated tai app
awaitfuture@DESKTOP-ICGEU3C:~/elixir_projects/tai$ ll
total 17
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:34 ./
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:32 ../
-rw-rw-rw- 1 awaitfuture awaitfuture    97 Aug  2 08:32 .formatter.exs
-rw-rw-rw- 1 awaitfuture awaitfuture   575 Aug  2 08:32 .gitignore
-rw-rw-rw- 1 awaitfuture awaitfuture    77 Aug  2 08:33 .iex.exs
-rw-rw-rw- 1 awaitfuture awaitfuture   477 Aug  2 08:32 README.md
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:34 _build/
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:34 deps/
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:32 lib/
-rw-rw-rw- 1 awaitfuture awaitfuture   584 Aug  2 08:33 mix.exs
-rw-rw-rw- 1 awaitfuture awaitfuture 11779 Aug  2 08:34 mix.lock
drwxrwxrwx 1 awaitfuture awaitfuture   512 Aug  2 08:32 test/
awaitfuture@DESKTOP-ICGEU3C:~/elixir_projects/tai$
# .iex.exs
Application.put_env(:elixir, :ansi_enabled, true)

import Tai.IEx

please let me know if there anything Ive missed or if theres any other information you would like.

Seperation of Database from main tai package.

Is your feature request related to a problem? Please describe.
I think there might be a case where a user of Tai would want to use for other tooling, such as analytics of order books or volatility. Therefore the OrderRepo might not be necessary and it might be an additional piece that can be plugged in. What do you think?

Really love the work done here. If i find some time i'll be willing to contribute.

Getting up and running

I'm trying to get this running. Do I need to register + provide API details for each exchange, or can I stream the public information using the dummy abc123 keys?

Using the dev.exs example:

** (Mix) Could not start application tai: exited in: Tai.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (ArgumentError) can't fetch value for key `:api_secret` of application `:ex_poloniex`, can not resolve key POLONIEX_API_SECRET value via adapter Elixir.Confex.Adapters.FileFromSystemEnvironment
            (confex) lib/confex.ex:245: Confex.resolve_and_update_env/2
            (elixir) lib/enum.ex:1336: Enum."-map/2-lists^map/1-0-"/2
            (tai) lib/tai.ex:8: Tai.start/2
            (kernel) application_master.erl:277: :application_master.start_it_old/4

I see the poloniex_api_key and poloniex_api_secret files in the /secrets folder, so I'm assuming that bit is all good.

Installation failed

Describe the bug

I'm new to Elixir and Tai.when I followed the installation instruction and ran mix setup , i got
** (Mix) The task "setup" could not be found.

To Reproduce
> mix new example
Then follow the instructions

Expected behavior
Maybe the Tai App? Still trying to understand.

Desktop (please complete the following information):

  • OS: macOS12.6,Elixir 1.14,Erlang 25
  • deps:
    {:tai, "~ > 0.0.75"},
    {:ecto_sqlite3, "~ > 0.7.1"},

Tai Config
don't know about it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.