![]() If baseUrl is not provided, it defaults to. Spot Testnet can be used to test /api/* endpoints, Spot Websocket Stream and WebSocket API. This package handles the pong responses automatically. Once connected, the websocket server sends a ping frame every 3 minutes and requires a response pong frame back withinĪ 10 minutes period. New WebSocketApi(apiKey: "apiKey", signatureService: new BinanceRsa(privateKey, "thePrivateKeyPassword")) New WebSocketApi(apiKey: "apiKey", signatureService: new BinanceRsa(privateKey)) New WebSocketApi(apiKey: "apiKey", signatureService: new BinanceHmac("apiSecret")) Authentication - WebSocket API // HMAC signature new SpotAccountTrade(httpClient, apiKey: apiKey, apiSecret: apiSecret)įor more details, please find the example from the endpoints /api/v3/account in file AccountInformation_Example. ![]() New SpotAccountTrade(httpClient, new BinanceRsa(privateKey, "thePrivateKeyPassword"), apiKey: "apiKey")įor V1.x, it's required to pass apiKey and apiSecret directly. New SpotAccountTrade(httpClient, new BinanceRsa(privateKey), apiKey: "apiKey") String privateKey = File.ReadAllText("/Users/john/ssl/PrivateKey.pem") ![]() New SpotAccountTrade(httpClient, new BinanceHmac("apiSecret"), apiKey: "apiKey") More websocket API examples are available in the Examples folder Authentication - RESTful APIsįor API endpoints that requires signature, new authentication interfaces are introduced to generate the signature since V2. If not sent, it defaults to CancellationToken.None. If not sent, it defaults to a randomly created GUID (Globally Unique Identifier). Var websocket = new WebSocketApi("wss:///ws-api/v3", "apiKey", new BinanceHmac("apiSecret")) Īwait (symbol: "BNBUSDT", side:, type:, timeInForce:, price: 300, quantity: 1, cancellationToken: CancellationToken.None) Ĭonsole.WriteLine("Disconnect with WebSocket API Server") Īwait websocket.DisconnectAsync(CancellationToken.None) Public static async Task Main(string args) More websocket examples are available in the Examples folder WebSocket API WebSocket StreamĪwait websocket.ConnectAsync(CancellationToken.None) Please find Examples folder to check for more endpoints. String serverTime = await market.CheckServerTime() Installation dotnet add package Binance.Spot Customizable base URL, request timeout and HTTP proxy.As an active part of the New Zealand technology and finance industries, we are proud members of BlockchainNZ and FintechNZ.This is a lightweight library that works as a connector to Binance public API Binance New Zealand will not be liable to you for any loss that might arise from your trading of cryptocurrencies. All trading strategies are used at your discretion and your own risk. The information here should not be regarded as financial or investment advice from Binance New Zealand. All of your margin balance may be liquidated in the event of extreme price movements. Past gains are not indicative of future returns. Risk warning: Trading carries substantial risk and the possibility of both significant profits and losses. For more details, please review our Binance New Zealand Terms of Service and Privacy Policy. IBB's registration on the New Zealand register of financial service providers or membership of the Insurance & Financial Services Ombudsman Scheme does not mean that IBB is subject to active regulation or oversight by a New Zealand regulator. IBB is not licensed by a New Zealand regulator to provide these financial services. IBB is registered on the New Zealand register of financial service providers (FSP number FSP1003864) to provide a range of financial services and is a member of the Insurance & Financial Services Ombudsman Scheme (membership number 5006834). Investbybit Limited (trading as "Binance New Zealand")("IBB") is a limited liability company duly incorporated in New Zealand (company number 7101293).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |