forked from binance/binance-connector-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Alexander Tanti <[email protected]>
- Loading branch information
Showing
96 changed files
with
2,946 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: "Bug Report" | ||
description: "Submit a bug report to help us improve the library" | ||
title: "Bug Report: " | ||
labels: [bug] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out our bug report form 🙏 | ||
- type: textarea | ||
id: reproduction | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Reproduction steps" | ||
description: "Please provide a step by step walkthrough on how to reproduce the bug." | ||
placeholder: > | ||
1) First step... | ||
2) Second step.... | ||
- type: textarea | ||
id: expected-behavior | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Expected behavior" | ||
description: "What did you expect to happen?" | ||
placeholder: "Expected Result..." | ||
- type: textarea | ||
id: actual-behavior | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Actual Behavior" | ||
description: "What did actually happen? (Add any useful information if available ex. screenshots or logs)" | ||
placeholder: "Actual Result... " | ||
- type: dropdown | ||
id: appwrite-version | ||
attributes: | ||
label: ".NET version" | ||
description: "What version of .NET are you running?" | ||
options: | ||
- .NET Core 3.1.x | ||
- .NET Framework 5.0.x | ||
- .NET Framework 6.0.x | ||
- Other (specify in environment) | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: operating-system | ||
attributes: | ||
label: "Operating system" | ||
description: "What OS are you using to reproduce the bug?" | ||
options: | ||
- Linux | ||
- MacOS | ||
- Windows | ||
- Other (specify in environment) | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: enviromnemt | ||
validations: | ||
required: false | ||
attributes: | ||
label: "Environment" | ||
description: "Any additional differences in your environment which may relate to the issue" | ||
placeholder: "" | ||
- type: textarea | ||
id: dotnet-info | ||
attributes: | ||
label: dotnet --info | ||
description: Run the dotnet --info command and copy and paste the results | ||
validations: | ||
required: false |
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,17 @@ | ||
name: "Documentation" | ||
description: "Documentation report" | ||
title: "Documentation: " | ||
labels: [documentation] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to help us improve our documentation | ||
- type: textarea | ||
id: issue-description | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Description" | ||
description: "A clear and concise description of what the issue is." | ||
placeholder: "Suggestion to change the documentation for..." |
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,28 @@ | ||
name: .NET Distributable | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master, rc-** ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ubuntu-latest, windows-latest, macOS-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET on 3.1.x, 5.0.x, 6.0.x | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: | | ||
3.1.x | ||
5.0.x | ||
6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build Src/Spot --no-restore |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release Distributables | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET on 6.0.x | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --configuration Release | ||
- name: Pack | ||
run: dotnet pack Src/Spot -p:NuspecFile=.nuspec -p:RepositoryBranch=${{ github.event.release.tag_name }} -o Release | ||
- name: Upload | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./Release/Binance.Spot.${{ github.event.release.tag_name }}.nupkg | ||
asset_name: Binance.Spot.${{ github.event.release.tag_name }}.nupkg | ||
asset_content_type: binary/octet-stream | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
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 AddLiquidityPreview_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<AddLiquidityPreview_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
var bSwap = new BSwap(httpClient); | ||
|
||
var result = await bSwap.AddLiquidityPreview(2, "SINGLE", "USDT", 1.1m); | ||
} | ||
} | ||
} |
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,30 @@ | ||
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 ClaimRewards_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<ClaimRewards_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
var bSwap = new BSwap(httpClient); | ||
|
||
var result = await bSwap.ClaimRewards(); | ||
} | ||
} | ||
} |
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,30 @@ | ||
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 GetClaimedHistory_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<GetClaimedHistory_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
var bSwap = new BSwap(httpClient); | ||
|
||
var result = await bSwap.GetClaimedHistory(); | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Examples/CSharp/BSwap/GetUnclaimedRewardsRecord_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,30 @@ | ||
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 GetUnclaimedRewardsRecord_Example | ||
{ | ||
public static async Task Main(string[] args) | ||
{ | ||
using var loggerFactory = LoggerFactory.Create(builder => | ||
{ | ||
builder.AddConsole(); | ||
}); | ||
ILogger logger = loggerFactory.CreateLogger<GetUnclaimedRewardsRecord_Example>(); | ||
|
||
HttpMessageHandler loggingHandler = new BinanceLoggingHandler(logger: logger); | ||
HttpClient httpClient = new HttpClient(handler: loggingHandler); | ||
|
||
var bSwap = new BSwap(httpClient); | ||
|
||
var result = await bSwap.GetUnclaimedRewardsRecord(); | ||
} | ||
} | ||
} |
Oops, something went wrong.