dvcrn / binance.ex Goto Github PK
View Code? Open in Web Editor NEWAutogenerated Elixir wrapper for the Binance public API
License: MIT License
Autogenerated Elixir wrapper for the Binance public API
License: MIT License
Hello
nodejs/go binance api libraries support also websocket apis
https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md
do you think to implement them in this packages?
regards
Matteo
implement GET /api/v3/openOrders (HMAC SHA256)
Open Orders
tests for GET /api/v3/openOrders (HMAC SHA256)
implement DELETE /api/v3/order
Cancel Order
tests for DELETE /api/v3/order
implement GET /api/v3/allOrders
All Orders
tests for GET /api/v3/allOrders
implement GET /api/v3/order
Get Order
tests for GET /api/v3/order
I started writing a wrapper around Binance's API to get historical data, and stumbled upon this repo. Would you be interested if I implemented the endpoint here?
While migrating from travis to github ci, I forgot the auto-publish to hex.
Add a new CI step to publish to hex when there is a new tag
Hi, I recently found this project, and I am in the process to integrate it into a (very early) project of mine, replacing my hacky binance http client code...
Currently I just miss one API endpoint: https://binance-docs.github.io/apidocs/spot/en/#system-status-system
How would I go about implementing it into binance.ex ?
I'm guessing there are contributing guidelines to follow ?
Currently, when using the master branch, I have this warning when running tests
$ mix test
Compiling 17 files (.ex)
Generated binance app
You have configured application :exvcr in your configuration file,
but the application is not available.
This usually means one of:
1. You have not added the application as a dependency in a mix.exs file.
2. You are configuring an application that does not really exist.
Please ensure :exvcr exists or remove the configuration.
...........................
Finished in 7.1 seconds
27 tests, 0 failures
Randomized with seed 257469
On my elixir setup, this can be fixed by removing the applications:
section in the MixProject in mix.exs
More info on this topic : https://www.amberbit.com/blog/2017/9/22/elixir-applications-vs-extra_applications-guide/
Also :exvcr
commands are not accessible simply
$ mix vcr.check
Compiling 17 files (.ex)
Generated binance app
** (Mix) The task "vcr.check" could not be found
This can be fixed by allowing the dependency to be used in the :dev
environment as well.
Not sure if there will be unintended side effects to these changes however ?
The PR is there #45
They're tagged in the git repo but not yet released to hex
Do you have any preference for a public CI? e.g. CircleCI, Travis etc...
First of all, thank you a lot for creating this wrapper! It helps me a lot.
I'm making an application that acts on behalf of multiple users. Currently api key and secret are global, stored in config. I'd love to be able to make requests using different credentials.
If I'll find time I'll try to create a PR, but just wanted to create an issue to let you know such feature would be very useful :)
Hi everyone, I am opening this issue to start a conversation regarding compiled / runtime configuration.
Few reasons for this :
adding a private function to the module where we call Application.get_env()
, instead of a module tag would make it changeable at runtime. Although not practical it would work fine in monoprocess situations (only one configuration possible) and would allow testing different configurations.
Would be better: functions need more parameters for tests (or user code) to be able to change endpoint/apikey/secret on call which will make this code usable in a multiprocess situation (one process can connect to one account, another to a different account for instance, they would crash independently, etc.).
Regarding 2., in my specific usecase, I am currently thinking to have one process for public requests, another one for authenticated requests (only this process would be started with apikey and secret). Call rates will be different, public requests can probably be cached for a short time (don't modify the real world), authenticated clients can crash and respawn independently, etc.
Adding these parameters to functions can make the API more complex, so we should think about how to do this without degrading the dev experience...
I see a couple of options:
%Binance.Connection{ endpoint: _, apikey: _ , secret: _ }
What do you think about 1. ? I can do a quick PR, if this is something you are interested in.
What do you think about 2. ?
Also, let me know of any other issue that would be useful that would be useful to work on and fall into this "configuration" topic. I am currently working on this on my code, so I can probably contribute something similar here.
Cheers !
I'm using Elixir 1.12.0 (compiled with Erlang/OTP 24) and get the following error:
(UndefinedFunctionError) function :crypto.hmac/3 is undefined or private
According to https://erlang.org/doc/apps/crypto/new_api.html hmac/3
and hmac/4
have been deprecated in 23.0 and removed in OTP 24.0. The replacement would be mac/3
or mac4
.
If it's important to maintain backward compatibility below 22.1 I suspect something like Kernel.function_exported?(:crypto, :mac, 3)
could be used to determine which function to use (although I have no idea if this is standard practice).
Happy to submit a pull request!
I recently needed to retrieve the trades of the account: https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
In case it helps, I have made a quick proof of concept over there: https://github.com/asmodehn/binance.ex/pull/4/files
I couldn't find a test for the account to follow it, so I didn't make any test for this endpoint either yet, but I am interested to discuss how these could eventually be implemented...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.