binance_api_dart

Last updated:

0 purchases

binance_api_dart Image
binance_api_dart Images
Add to Cart

Description:

binance api dart

This package aims to simplify the signature creation process for binance api. The package takes any type of parameter
and creates the signature before making the http call to the binance api.
Features #
This package help you to manage the http connetion to binance api. It create the signature and do the http calls.
Supported http methods:

GET
POST
PUT
DELETE

All the methods return a http.Response type from which you can easily get the json decoded model.
Getting started #
no particular preconditions are required. The package only needs the http package to work. You can add http to your dependecies in this way:
dependencies:
http: ^0.13.3
copied to clipboard
Usage #
How to use example:
BinanceApi binanceApi = BinanceApi(apiKey: '<YOUR_API_KEY>', privateKey: '<YOUR_API_KEY>', baseUrl: 'fapi.binance.com');

// http get example
Map<String, String> getParameters = Map();
getParameters['symbol'] = 'BTC/USDT';
getParameters['interval'] = '5m';

binanceApi.getHttp('/fapi/v1/markPriceKlines', getParameters);

// http post example
Map<String, String> postParameters = Map();
getParameters['symbol'] = 'BTC/USDT';
getParameters['side'] = 'BUY';
getParameters['type'] = 'LIMIT';

binanceApi.postHttp('/fapi/v1/order', postParameters);

// http put example
Map<String, String> putParameters = Map();

binanceApi.postHttp('/fapi/v1/listenKey', putParameters);

// http delete example
Map<String, String> deleteParameters = Map();

binanceApi.postHttp('/fapi/v1/listenKey', putParameters);

//json decoding
binanceApi.getHttp('/fapi/v1/markPriceKlines', getParameters).then((response){
dynamic decoded = json.decode(response.body);
});
copied to clipboard
Additional information #
This is a very new project, contributions indications coming soon....

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.