brightball

brightball

Any experience with Investment APIs using Elixir?

I’m considering experimenting with some long term personal investment strategy by coding it. I have a hard time approaching investments from a manual research standpoint when I approach everything else from a data + formula standpoint, so I’m looking at the Ally Invest API to try to craft something.

Initially (first year or so) I’m not planning on actually executing any trades, just gathering information and letting it simulate actions to see how it performs.

Since there’s such a variety of experience on this board, I’m wondering if anybody else has done something similar and if there were any suggestions. Just for my own personal Elixir enjoyment reasons, I’m thinking of using GenStage to ingest and consume the investment data, compressing it into Postgres using the CStore extension and then alerting me with recommendations with the formula has something it thinks I should act on.

Any feedback or gotchas would be appreciated.

Most Liked

slashdotdash

slashdotdash

Here are a few trading-related Elixir projects on GitHub you might find useful (I haven’t tried any of them).

  • elixir_trading_platform - A realtime trading platform powered by phoenix and websockets.
  • lgthorn - Cryptocurrency trading bot.
  • tai - A trading toolkit built with Elixir that runs on the Erlang virtual machine.
  • talib - Technical Analysis Library written in Elixir.
dbelwood

dbelwood

I’m currently writing an automated trading tool against alpaca.markets. Unless you’re doing crypto, you probably won’t need the bells and whistles of GenStage. I’m wrapping an API endpoint in an HTTPoison client and a WebSocket client in WebSockex and feeding through to GenServer procs. Biggest hurdle ATM the moment is designing a resilient system when the system of record is external, i.e. the website. I.e., re-syncing on failure. Happy to share any hard lessons I’ve learned or gotchas in more detail.

dbelwood

dbelwood

Either’s fine with me.

Re: GenStage, totally understand. I had the same inclination coming from data pipelines and Kafka. I’m having to re-wire my brain to adopt the let it fail and pick up the pieces mentality.

Currently on my third revision of the codeline, but I feel like I’m getting closer to the best Elixir/OTP way to do it. I.e. more, smaller procs and using bounded contexts and pure functions

Where Next?

Popular in Discussions Top

matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New
Rustixir
Hi everyone, im working on find best language/framework/system for high concurrency, high performance and stable performance after wor...
New
jeramyRR
This is an interesting article to read. Elixir’s performance, like usual, is excellent. However, it seems like the high CPU usage is co...
New
WildYorkies
It seems that the more I read, the more I find Elixir users speaking about all the ways that Elixir is not good for x, y, and z use cases...
New
nunobernardes99
Hi there Elixir friends :vulcan_salute: In a recent task I was on, I needed to check in two dates which of them is the maximum and which...
New
mbenatti
Following https://github.com/tbrand/which_is_the_fastest |> https://raw.githubusercontent.com/tbrand/which_is_the_fastest/master/imgs...
New
ejpcmac
I have discovered Nix last month and I am currently on my way to migrating to it—both on macOS at home and the full NixOS distrubution at...
New
Qqwy
I would like to spark a discussion about the static access operator: .. For whom does not know: it is used in Elixir to access fields of...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine th...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement