-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
137 changed files
with
1,963 additions
and
1,382 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
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 was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
examples/restful/margin/getIsolatedMarginTransferHistory.ts
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import dotenv from 'dotenv'; | ||
import { RestMarginTypes, Spot } from '../../../src/index'; | ||
|
||
dotenv.config(); | ||
|
||
const apiKey = process.env.BINANCE_API_KEY || ''; | ||
const apiSecret = process.env.BINANCE_API_SECRET || ''; | ||
const baseURL = process.env.BINANCE_BASE_URL || ''; | ||
const client = new Spot(apiKey, apiSecret, { baseURL: baseURL }); | ||
|
||
client.getLeverageBracket().then((res: RestMarginTypes.getLeverageBracketResponse[]) => { | ||
console.log(res); | ||
}).catch(err => { console.log(err); }); |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 @@ | ||
import dotenv from 'dotenv'; | ||
import { MarginBorrowRepayType, RestMarginTypes, Spot } from '../../../src/index'; | ||
|
||
dotenv.config(); | ||
|
||
const apiKey = process.env.BINANCE_API_KEY || ''; | ||
const apiSecret = process.env.BINANCE_API_SECRET || ''; | ||
const baseURL = process.env.BINANCE_BASE_URL || ''; | ||
const client = new Spot(apiKey, apiSecret, { baseURL: baseURL }); | ||
|
||
const options: RestMarginTypes.marginAccountBorrowRepayOptions = { | ||
recvWindow: 5000, | ||
}; | ||
|
||
client.marginAccountBorrowRepay('BNB', 'FALSE', 'BNBUSDT', '1.0', MarginBorrowRepayType.BORROW, options).then((res: RestMarginTypes.marginAccountBorrowRepayResponse) => { | ||
console.log(res); | ||
}).catch(err => { console.log(err); }); |
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,15 @@ | ||
import dotenv from 'dotenv'; | ||
import { RestMarketTypes, Spot } from '../../../src/index'; | ||
|
||
dotenv.config(); | ||
|
||
const baseURL = process.env.BINANCE_BASE_URL || ''; | ||
const client = new Spot('', '', { baseURL: baseURL }); | ||
|
||
const options: RestMarketTypes.tradingDayTickerOptions = { | ||
type: 'MINI', | ||
}; | ||
|
||
client.tradingDayTicker('BNBUSDT', options).then((res: RestMarketTypes.tradingDayTickerResponse | RestMarketTypes.tradingDayTickerResponse[]) => { | ||
console.log(res); | ||
}).catch(err => { console.log(err); }); |
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,13 @@ | ||
import dotenv from 'dotenv'; | ||
import { RestTradeTypes, Spot } from '../../../src/index'; | ||
|
||
dotenv.config(); | ||
|
||
const apiKey = process.env.BINANCE_API_KEY || ''; | ||
const apiSecret = process.env.BINANCE_API_SECRET || ''; | ||
const baseURL = process.env.BINANCE_BASE_URL || ''; | ||
const client = new Spot(apiKey, apiSecret, { baseURL: baseURL }); | ||
|
||
client.getCommissionRates('BNBUSDT').then((res: RestTradeTypes.getCommissionRatesResponse) => { | ||
console.log(res); | ||
}).catch(err => { console.log(err); }); |
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
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.