-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Place Buy/Sell order? #80
Comments
Hi slobox,
Koen |
Hello,
Thanks for your reply.
I have Binance account and I tested with my APi,everything works very well.
I know the VB programming language but I'm not as skilled as you are.
I will share with you the idea I have.
I would like to make a boot for an automated trade whose trigger would be
an Excel formula that tracks the value of the cryptocurrency and at some
point sends a request to buy or sell.
I would ask you for help in that part of how to make a trade from excel via
api.
Thanks
pon, 28. jun 2021. 10:39 Koen Rijnsent ***@***.***> је
написао/ла:
… Hi slobox,
- what exchange are you trying to connect to? Every exchange has API
documentation, the answer should be there and/or in the examples that are
at the top of the exchange modules.
- my code base is built for people who do know some VBA, how is your
VBA?
Koen
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMGVR5UA3H4HX22C6GIY5NTTVAYL7ANCNFSM47MQZD4A>
.
|
If you look in the ModExchBinance: Set Test = Suite.Test("TestBinancePrivate POST/DELETE") -> Hope that helps, |
Hi friend, I'm from Brazil and I liked your work. Could you make a video explaining how to connect to the binance API?, how to make a purchase and a sale?. Makes a simple video explaining how to use your code, I understand a little bit about VBA, if you want to charge for your video I pay, I really need to learn how to access the binance api through VBA. My whatsapp is +55 (92) 984472839. I will be forever grateful for this help. |
Hi @infoletrico ,
So the simplest form of a BUY order is:
|
Thank you very much, I will try to use this code and create retrofits. I'm
not as good at VBA as you are but I know how to do a lot of things in VBA.
Keep up the good work, you are an inspiration.
Em seg., 25 de out. de 2021 às 06:18, Koen Rijnsent <
***@***.***> escreveu:
… Hi friend, I'm from Brazil and I liked your work. Could you make a video
explaining how to connect to the binance API?, how to make a purchase and a
sale?. Makes a simple video explaining how to use your code, I understand a
little bit about VBA, if you want to charge for your video I pay, I really
need to learn how to access the binance api through VBA. My whatsapp is +55
(92) 984472839. I will be forever grateful for this help.
Hi @infoletrico <https://github.com/infoletrico> ,
thanks for the feedback. Currently I have no "ready to use" tool, but as I
write on the readme: "Please consider the code I provide as simple building
blocks: if you want to build a project based on this code, you will have to
know (some) VBA." Making a video is not something I planned, I can give you
a short howto here:
So the steps to connect to the Binance API
- Create an API key in your Binance account. You should get a Private
Key & a Public Key
- Open the Excel file - crypto_vba_example.xlsm and go to the Binance
Sheet
- Place your API keys in the right cells
- Go to VBA (ALT+F11), to the Binance Sheet and start the macro called
GetMyBinanceData
- That macro uses the code in ModExchBinance to pull in some basic
data. In that module, there is also an example of an order, just under the
line Set Test = Suite.Test("TestBinancePrivate POST/DELETE")
- To get a good Buy or Sell order, check out the Binance API data to
see what the right endpoint is and what parameters are needed.
https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md
So the simplest form of a BUY order is:
Sub BuyOrder()
'Put the credentials in a dictionary
Dim Cred As New Dictionary
Cred.Add "apiKey", "YOURAPIKEYHERE"
Cred.Add "secretKey", "YOURSECRETKEYHERE"
'Put all required parameters in a dictionary
Dim Params3 As New Dictionary
Params3.Add "symbol", "LTCBTC"
Params3.Add "side", "BUY"
Params3.Add "type", "LIMIT"
Params3.Add "price", 0.01
Params3.Add "quantity", 1
Params3.Add "timeInForce", "GTC"
Params3.Add "timestamp", GetBinanceTime()
'Run the PrivateBinance Function (in ModExchBinance) to send the order and receive an answer from the server
Dim TestResult as String
TestResult = PrivateBinance("api/v3/order", "POST", Cred, Params3)
'Display the result
MsgBox TestResult, vbOkOnly
End Sub
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD6I5NUKKEXJOGXODTRPG2DUIUOGLANCNFSM47MQZD4A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hello friend, I'm trying to make this call Dim Params As New Dictionary but it comes with all the coins from binance and I would like it to show only for one currency, is there a way to get information for only one currency? |
Hello,
How to place buy or sell order.
Thanks
The text was updated successfully, but these errors were encountered: