-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from binance/rc-1.8.0
1.8.0 release
- Loading branch information
Showing
11 changed files
with
352 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
Examples/CSharp/PortfolioMargin/PortfolioMarginBankruptcyLoanRepay_Example.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Binance.Spot.PortfolioMarginExamples | ||
{ | ||
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 PortfolioMarginBankruptcyLoanRepay_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<PortfolioMarginBankruptcyLoanRepay_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
string apiKey = "api-key"; | ||
string apiSecret = "api-secret"; | ||
|
||
var portfolioMargin = new PortfolioMargin(httpClient, apiKey: apiKey, apiSecret: apiSecret); | ||
|
||
var result = await portfolioMargin.PortfolioMarginBankruptcyLoanRepay(); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Examples/CSharp/PortfolioMargin/PortfolioMarginCollateralRate_Example.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Binance.Spot.PortfolioMarginExamples | ||
{ | ||
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 PortfolioMarginCollateralRate_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<PortfolioMarginCollateralRate_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
string apiKey = "api-key"; | ||
string apiSecret = "api-secret"; | ||
|
||
var portfolioMargin = new PortfolioMargin(httpClient, apiKey: apiKey, apiSecret: apiSecret); | ||
|
||
var result = await portfolioMargin.PortfolioMarginCollateralRate(); | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
Examples/CSharp/PortfolioMargin/QueryPortfolioMarginBankruptcyLoanAmount_Example.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Binance.Spot.PortfolioMarginExamples | ||
{ | ||
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 QueryPortfolioMarginBankruptcyLoanAmount_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<QueryPortfolioMarginBankruptcyLoanAmount_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
string apiKey = "api-key"; | ||
string apiSecret = "api-secret"; | ||
|
||
var portfolioMargin = new PortfolioMargin(httpClient, apiKey: apiKey, apiSecret: apiSecret); | ||
|
||
var result = await portfolioMargin.QueryPortfolioMarginBankruptcyLoanAmount(); | ||
} | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Examples/FSharp/PortfolioMargin/PortfolioMarginBankruptcyLoanRepay_Example.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
open System | ||
open System.Net | ||
open System.Net.Http | ||
open System.Threading.Tasks | ||
open Microsoft.Extensions.Logging | ||
open Binance.Common | ||
open Binance.Spot | ||
open Binance.Spot.Models | ||
|
||
[<EntryPoint>] | ||
let main argv = | ||
let loggerFactory = LoggerFactory.Create(fun (builder:ILoggingBuilder) -> | ||
builder.AddConsole() |> ignore | ||
) | ||
let logger = loggerFactory.CreateLogger() | ||
|
||
let loggingHandler = new BinanceLoggingHandler(logger) | ||
let httpClient = new HttpClient(loggingHandler) | ||
|
||
let apiKey = "api-key"; | ||
let apiSecret = "api-secret"; | ||
|
||
let portfolioMargin = new PortfolioMargin(httpClient, apiKey = apiKey, apiSecret = apiSecret) | ||
|
||
let result = portfolioMargin.PortfolioMarginBankruptcyLoanRepay() |> Async.AwaitTask |> Async.RunSynchronously | ||
|
||
0 |
27 changes: 27 additions & 0 deletions
27
Examples/FSharp/PortfolioMargin/PortfolioMarginCollateralRate_Example.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
open System | ||
open System.Net | ||
open System.Net.Http | ||
open System.Threading.Tasks | ||
open Microsoft.Extensions.Logging | ||
open Binance.Common | ||
open Binance.Spot | ||
open Binance.Spot.Models | ||
|
||
[<EntryPoint>] | ||
let main argv = | ||
let loggerFactory = LoggerFactory.Create(fun (builder:ILoggingBuilder) -> | ||
builder.AddConsole() |> ignore | ||
) | ||
let logger = loggerFactory.CreateLogger() | ||
|
||
let loggingHandler = new BinanceLoggingHandler(logger) | ||
let httpClient = new HttpClient(loggingHandler) | ||
|
||
let apiKey = "api-key"; | ||
let apiSecret = "api-secret"; | ||
|
||
let portfolioMargin = new PortfolioMargin(httpClient, apiKey = apiKey, apiSecret = apiSecret) | ||
|
||
let result = portfolioMargin.PortfolioMarginCollateralRate() |> Async.AwaitTask |> Async.RunSynchronously | ||
|
||
0 |
27 changes: 27 additions & 0 deletions
27
Examples/FSharp/PortfolioMargin/QueryPortfolioMarginBankruptcyLoanAmount_Example.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
open System | ||
open System.Net | ||
open System.Net.Http | ||
open System.Threading.Tasks | ||
open Microsoft.Extensions.Logging | ||
open Binance.Common | ||
open Binance.Spot | ||
open Binance.Spot.Models | ||
|
||
[<EntryPoint>] | ||
let main argv = | ||
let loggerFactory = LoggerFactory.Create(fun (builder:ILoggingBuilder) -> | ||
builder.AddConsole() |> ignore | ||
) | ||
let logger = loggerFactory.CreateLogger() | ||
|
||
let loggingHandler = new BinanceLoggingHandler(logger) | ||
let httpClient = new HttpClient(loggingHandler) | ||
|
||
let apiKey = "api-key"; | ||
let apiSecret = "api-secret"; | ||
|
||
let portfolioMargin = new PortfolioMargin(httpClient, apiKey = apiKey, apiSecret = apiSecret) | ||
|
||
let result = portfolioMargin.QueryPortfolioMarginBankruptcyLoanAmount() |> Async.AwaitTask |> Async.RunSynchronously | ||
|
||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.