ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - QuinnWilton/stockastic: Simple Elixir wrapper for the Stockfighter API
Simple Elixir wrapper for the Stockfighter API. Contribute to QuinnWilton/stockastic development by creating an account on GitHub.
Visit Site

GitHub - QuinnWilton/stockastic: Simple Elixir wrapper for the Stockfighter API

GitHub - QuinnWilton/stockastic: Simple Elixir wrapper for the Stockfighter API

Stockastic

Simple Elixir wrapper for the Stockfighter API.

Documentation can be found here

Quickstart

First, add Stockastic to your mix.exs dependencies:

def deps do
  [{:stockastic, "~> 0.0.2"}]
end

Fetching dependencies and running on elixir console:

mix deps.get
iex -S mix

You will see something like this:

Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.1.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Stockastic.start

Examples

Instantiating an authenticated client:

iex(1)> client = Stockastic.Client.new(%{access_token: "API_TOKEN_HERE"})
%Stockastic.Client{auth: %{access_token: "API_TOKEN_HERE"},
 endpoint: "https://api.stockfighter.io/ob/api/"}

List stocks for a venue:

iex(2)> Stockastic.Stocks.list("EMWEX", client)                                                    
%{"ok" => true,
  "symbols" => [%{"name" => "IdeaMountain Ltd.", "symbol" => "IML"}]}

Listing orders for a stock, on a venue:

iex(3)> Stockastic.Orders.list_for_stock("EMWEX", "YS53802698", "IML", client)                     
%{"ok" => true, "orders" => []}

Fetching the orderbook for a stock, on a venue:

iex(4)> Stockastic.Stocks.orderbook("EMWEX", "IML", client)                                        
%{"asks" => nil,
  "bids" => [%{"isBuy" => true, "price" => 6019, "qty" => 176},
   %{"isBuy" => true, "price" => 5765, "qty" => 1691},
   %{"isBuy" => true, "price" => 5737, "qty" => 1691},
   %{"isBuy" => true, "price" => 5709, "qty" => 1691}], "ok" => true,
  "symbol" => "IML", "ts" => "2015-12-11T20:25:06.068350021Z",
  "venue" => "EMWEX"}

Further documentation is available here.

Contributing

Start by forking this repo

Then run this command to fetch dependencies and run tests:

MIX_ENV=test mix do deps.get, test

Pull requests are greatly appreciated

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory