Skip to content

Commit

Permalink
1.5.0 changes (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
tantialex authored May 27, 2022
1 parent e998add commit c3373b7
Show file tree
Hide file tree
Showing 493 changed files with 4,395 additions and 1,273 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
# Changelog

## 1.5.0 - 2022-05-27
### Added
- New endpoint for Binance Code:
- `GET /sapi/v1/giftcard/cryptography/rsa-public-key` to fetch RSA public key.

- New endpoints for Staking:
- `GET /sapi/v1/staking/productList` to get Staking product list
- `POST /sapi/v1/staking/purchase` to stake product
- - `POST /sapi/v1/staking/redeem` to redeem product
- `GET /sapi/v1/staking/position` to get Staking product holding position
- `GET /sapi/v1/staking/stakingRecord` to inquiry Staking history records
- `POST /sapi/v1/staking/setAutoStaking` to set Auto Staking function
- `GET /sapi/v1/staking/personalLeftQuota` to inquiry Staking left quota

- New endpoint for Portfolio Margin:
- `GET /sapi/v1/portfolio/account` to support query portfolio margin account info

- New endpoint for BSwap:
- `GET /sapi/v1/bswap/removeLiquidityPreview` to get remove liquidity preview

### Changed
- Update endpoint for Binance Code:
- `POST /sapi/v1/giftcard/redeemCode`: new optional parameter externalUid. Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users.

- Update endpoints for Market:
- `GET /api/v3/ticker/24hr`, `GET /api/v3/ticker/price` and `GET /api/v3/ticker/bookTicker` new optional parameter symbols.

### Fixed
- Added missing `Market` examples.
- Updated endpoint documentation and examples to latest version.
- Added missing `Mining` endpoint parameters.

## 1.4.0 - 2022-04-20
### Added
- New endpoint for Sub-Account
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BLVT/GetBlvtInfo_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.GetBlvtInfo();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BLVT/GetBlvtUserLimitInfo_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.GetBlvtUserLimitInfo();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BLVT/QueryRedemptionRecord_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.QueryRedemptionRecord();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BLVT/QuerySubscriptionRecord_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.QuerySubscriptionRecord();
}
Expand Down
7 changes: 5 additions & 2 deletions Examples/CSharp/BLVT/RedeemBlvt_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await blvt.RedeemBlvt("BTCDOWN", 10.05022099m);
var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.RedeemBlvt("BTCDOWN", 1.01m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BLVT/SubscribeBlvt_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var blvt = new BLVT(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await blvt.SubscribeBlvt("BTCDOWN", 9.99999995m);
var blvt = new BLVT(httpClient, apiKey, apiSecret);

var result = await blvt.SubscribeBlvt("BTCDOWN", 1.01m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BSwap/AddLiquidityPreview_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await bSwap.AddLiquidityPreview(2, "SINGLE", "USDT", 1.1m);
var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.AddLiquidityPreview(2, "SINGLE", "USDT", 12415.2m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BSwap/AddLiquidity_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await bSwap.AddLiquidity(2, "USDT", 522.23m);
var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.AddLiquidity(2, "BTC", 12415.2m);
}
}
}
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/ClaimRewards_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.ClaimRewards();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/GetClaimedHistory_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.GetClaimedHistory();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.GetLiquidityInformationOfAPool();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/GetLiquidityOperationRecord_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.GetLiquidityOperationRecord();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/GetSwapHistory_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.GetSwapHistory();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/GetUnclaimedRewardsRecord_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.GetUnclaimedRewardsRecord();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/ListAllSwapPools_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.ListAllSwapPools();
}
Expand Down
5 changes: 4 additions & 1 deletion Examples/CSharp/BSwap/PoolConfigure_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.PoolConfigure();
}
Expand Down
33 changes: 33 additions & 0 deletions Examples/CSharp/BSwap/RemoveLiquidityPreview_Example.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
namespace Binance.Spot.BSwapExamples
{
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Binance.Common;
using Binance.Spot;
using Binance.Spot.Models;
using Microsoft.Extensions.Logging;

public class RemoveLiquidityPreview_Example
{
public static async Task Main(string[] args)
{
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddConsole();
});
ILogger logger = loggerFactory.CreateLogger<RemoveLiquidityPreview_Example>();

HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

string apiKey = "api-key";
string apiSecret = "api-secret";

var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.RemoveLiquidityPreview(2, "SINGLE", "USDT", 12415.2m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BSwap/RemoveLiquidity_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await bSwap.RemoveLiquidity(2, LiquidityRemovalType.SINGLE, 522.23m);
var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.RemoveLiquidity(2, LiquidityRemovalType.SINGLE, 12415.2m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BSwap/RequestQuote_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await bSwap.RequestQuote("USDT", "BUSD", 300000m);
var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.RequestQuote("USDT", "BUSD", 12415.2m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/BSwap/Swap_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var bSwap = new BSwap(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await bSwap.Swap("USDT", "BUSD", 300000m);
var bSwap = new BSwap(httpClient, apiKey, apiSecret);

var result = await bSwap.Swap("USDT", "BUSD", 12415.2m);
}
}
}
7 changes: 5 additions & 2 deletions Examples/CSharp/C2C/GetC2cTradeHistory_Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var c2C = new C2C(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await c2C.GetC2cTradeHistory(Side.BUY);
var c2c = new C2C(httpClient, apiKey, apiSecret);

var result = await c2c.GetC2cTradeHistory(Side.BUY);
}
}
}
8 changes: 6 additions & 2 deletions Examples/CSharp/Convert/GetConvertTradeHistory_Example.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace Binance.Spot.ConvertExamples
{
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
Expand All @@ -21,9 +22,12 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var convert = new Convert(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var result = await convert.GetConvertTradeHistory(1639646747000, 1642325147000);
var convert = new Convert(httpClient, apiKey, apiSecret);

var result = await convert.GetConvertTradeHistory(1563189166000, 1563282766000);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var cryptoLoans = new CryptoLoans(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var cryptoLoans = new CryptoLoans(httpClient, apiKey, apiSecret);

var result = await cryptoLoans.GetCryptoLoansIncomeHistory("BTC");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static async Task Main(string[] args)
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger);
HttpClient httpClient = new HttpClient(handler: loggingHandler);

var fiat = new Fiat(httpClient);
string apiKey = "api-key";
string apiSecret = "api-secret";

var fiat = new Fiat(httpClient, apiKey, apiSecret);

var result = await fiat.GetFiatDepositWithdrawHistory(FiatOrderTransactionType.DEPOSIT);
}
Expand Down
Loading

0 comments on commit c3373b7

Please sign in to comment.