Giter Club home page Giter Club logo

Comments (7)

krijnsent avatar krijnsent commented on September 27, 2024

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

from crypto_vba.

slobox avatar slobox commented on September 27, 2024

from crypto_vba.

krijnsent avatar krijnsent commented on September 27, 2024

If you look in the ModExchBinance:

Set Test = Suite.Test("TestBinancePrivate POST/DELETE") ->
The part below that creates an order and sends it to the Binance test endpoint (order/test), which matches this part of the Binance API documentation:
https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#new-order--trade

Hope that helps,
Koen

from crypto_vba.

infoletrico avatar infoletrico commented on September 27, 2024

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.

from crypto_vba.

krijnsent avatar krijnsent commented on September 27, 2024

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 ,
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

from crypto_vba.

infoletrico avatar infoletrico commented on September 27, 2024

from crypto_vba.

infoletrico avatar infoletrico commented on September 27, 2024

Hello friend, I'm trying to make this call

Dim Params As New Dictionary
Params.Add "timestamp", GetBinanceTime()
JsonResponse = PrivateBinance("sapi/v1/capital/config/getall", "GET", Cred, Params)

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?

from crypto_vba.

Related Issues (20)

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.