Skip to content

Commit 5c270ff

Browse files
authored
Merge pull request #631 from JJ-Cro/updateExamples3001
feat: add multiple examples for futures and spot trading, including demo trading and websocket integration
2 parents fcb6ac8 + 566812f commit 5c270ff

35 files changed

+38
-177
lines changed

examples/REST/rest-future-bracket-order.ts renamed to examples/Rest/Futures/rest-future-bracket-order.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NewFuturesOrderParams, USDMClient } from '../../src/index';
1+
import { NewFuturesOrderParams, USDMClient } from '../../../src/index';
22

33
const key = process.env.API_KEY_COM || 'APIKEY';
44
const secret = process.env.API_SECRET_COM || 'APISECRET';
@@ -9,9 +9,6 @@ const client = new USDMClient({
99
beautifyResponses: true,
1010
});
1111

12-
const symbol = 'ETHUSDT';
13-
14-
// submit a 1:1 bracket market buy order with market entry order
1512
(async () => {
1613
try {
1714
// TODO: check balance and do other validations
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USDMClient } from '../../src/index';
1+
import { USDMClient } from '../../../src/index';
22

33
// or
44
// import { USDMClient } from 'binance';

examples/REST/rest-usdm-order-sl.ts renamed to examples/Rest/Futures/rest-usdm-order-sl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-unused-vars */
2-
import { USDMClient } from '../../src/index';
2+
import { USDMClient } from '../../../src/index';
33

44
// or
55
// import { USDMClient } from 'binance';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USDMClient } from '../../src/index';
1+
import { USDMClient } from '../../../src/index';
22

33
// or
44
// import { USDMClient } from 'binance';

examples/REST/rest-usdm-private-get.ts renamed to examples/Rest/Futures/rest-usdm-private-get.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USDMClient } from '../../src/index';
1+
import { USDMClient } from '../../../src/index';
22
// import axios from 'axios';
33

44
// or
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USDMClient } from '../../src';
1+
import { USDMClient } from '../../../src';
22

33
const client = new USDMClient({
44
testnet: true,

examples/REST/rest-usdm-testnet.ts renamed to examples/Rest/Futures/rest-usdm-testnet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { USDMClient } from '../../src/index';
1+
import { USDMClient } from '../../../src/index';
22

33
// or
44
// import { USDMClient } from 'binance';

examples/REST/rest-portfoliomargin-private.ts renamed to examples/Rest/Portfolio Margin/rest-portfoliomargin-private.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PortfolioClient } from '../../src/index';
1+
import { PortfolioClient } from '../../../src/index';
22

33
// or
44
// import { PortfolioClient } from 'binance';

examples/REST/rest-portfoliomargin-public.ts renamed to examples/Rest/Portfolio Margin/rest-portfoliomargin-public.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PortfolioClient } from '../../src/index';
1+
import { PortfolioClient } from '../../../src/index';
22

33
// or
44
// import { PortfolioClient } from 'binance';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MainClient } from '../../src/index';
1+
import { MainClient } from '../../../src/index';
22

33
// or
44
// import { MainClient } from 'binance';

0 commit comments

Comments
 (0)