Skip to content

Commit e5ab2dd

Browse files
committed
[Components] Bitget - new components
1 parent 53f0b06 commit e5ab2dd

File tree

47 files changed

+3150
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3150
-15
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-all-symbols-contracts",
5+
name: "Future - Market - Get All Symbols Contracts",
6+
description: "Retrieve all contract symbols by product type. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-All-Symbols-Contracts)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
propDefinition: [
13+
app,
14+
"symbol",
15+
],
16+
},
17+
productType: {
18+
propDefinition: [
19+
app,
20+
"productType",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const {
26+
app,
27+
symbol,
28+
productType,
29+
} = this;
30+
31+
const response = await app.getFutureMarketAllSymbolsContracts({
32+
$,
33+
params: {
34+
symbol,
35+
productType,
36+
},
37+
});
38+
39+
$.export("$summary", `Successfully retrieved all contract symbols for product type \`${productType}\``);
40+
return response;
41+
},
42+
};
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-candle-data",
5+
name: "Future - Market - Get Candle Data",
6+
description: "Retrieve candlestick data for a contract symbol. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Candle-Data)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
optional: false,
13+
propDefinition: [
14+
app,
15+
"symbol",
16+
],
17+
},
18+
productType: {
19+
propDefinition: [
20+
app,
21+
"productType",
22+
],
23+
},
24+
granularity: {
25+
propDefinition: [
26+
app,
27+
"granularity",
28+
],
29+
},
30+
startTime: {
31+
propDefinition: [
32+
app,
33+
"startTime",
34+
],
35+
},
36+
endTime: {
37+
propDefinition: [
38+
app,
39+
"endTime",
40+
],
41+
},
42+
limit: {
43+
type: "integer",
44+
label: "Limit",
45+
description: "Default: `100`, maximum: `1000`",
46+
optional: true,
47+
min: 1,
48+
max: 1000,
49+
},
50+
},
51+
async run({ $ }) {
52+
const {
53+
app,
54+
symbol,
55+
granularity,
56+
startTime,
57+
endTime,
58+
limit,
59+
} = this;
60+
61+
const response = await app.getFutureMarketCandleData({
62+
$,
63+
symbol,
64+
granularity,
65+
startTime,
66+
endTime,
67+
limit,
68+
});
69+
70+
$.export("$summary", `Successfully retrieved candle data points for \`${symbol}\``);
71+
return response;
72+
},
73+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-contracts-oi",
5+
name: "Future - Market - Get Contracts OI",
6+
description: "Retrieve open interest for contracts. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Contracts-Oi)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
propDefinition: [
13+
app,
14+
"symbol",
15+
],
16+
},
17+
productType: {
18+
propDefinition: [
19+
app,
20+
"productType",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const {
26+
app,
27+
symbol,
28+
productType,
29+
} = this;
30+
31+
const response = await app.getFutureMarketContractsOi({
32+
$,
33+
params: {
34+
symbol,
35+
productType,
36+
},
37+
});
38+
39+
$.export("$summary", `Successfully retrieved contracts open interest for \`${symbol}\``);
40+
return response;
41+
},
42+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-current-funding-rate",
5+
name: "Future - Market - Get Current Funding Rate",
6+
description: "Retrieve current funding rate for a contract symbol. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Current-Funding-Rate)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
propDefinition: [
13+
app,
14+
"symbol",
15+
],
16+
},
17+
productType: {
18+
propDefinition: [
19+
app,
20+
"productType",
21+
],
22+
},
23+
},
24+
async run({ $ }) {
25+
const {
26+
app,
27+
symbol,
28+
productType,
29+
} = this;
30+
31+
const response = await app.getFutureMarketCurrentFundingRate({
32+
$,
33+
params: {
34+
symbol,
35+
productType,
36+
},
37+
});
38+
39+
$.export("$summary", `Successfully retrieved current funding rate for \`${symbol}\``);
40+
return response;
41+
},
42+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-discount-rate",
5+
name: "Future - Market - Get Discount Rate",
6+
description: "Retrieve discount rate information for contract trading. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Discount-Rate)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
async run({ $ }) {
13+
const response = await this.app.getFutureMarketDiscountRate({
14+
$,
15+
});
16+
17+
$.export("$summary", `Successfully retrieved discount rate information with \`${response?.data?.length}\` record(s)`);
18+
return response;
19+
},
20+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-exchange-rate",
5+
name: "Future - Market - Get Exchange Rate",
6+
description: "Get interest exchange rate information for contract trading. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Exchange-Rate)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
},
12+
async run({ $ }) {
13+
const response = await this.app.getFutureMarketExchangeRate({
14+
$,
15+
});
16+
17+
$.export("$summary", `Successfully retrieved exchange rate information with \`${response?.data?.length}\` record(s)`);
18+
return response;
19+
},
20+
};
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-fills-history",
5+
name: "Future - Market - Get Fills History",
6+
description: "Retrieve historical fill data for a contract symbol. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-Fills-History)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
optional: false,
13+
propDefinition: [
14+
app,
15+
"symbol",
16+
],
17+
},
18+
productType: {
19+
propDefinition: [
20+
app,
21+
"productType",
22+
],
23+
},
24+
limit: {
25+
type: "integer",
26+
label: "Limit",
27+
description: "Default: `500`, maximum: `1000`",
28+
optional: true,
29+
min: 1,
30+
max: 1000,
31+
},
32+
startTime: {
33+
propDefinition: [
34+
app,
35+
"startTime",
36+
],
37+
},
38+
endTime: {
39+
propDefinition: [
40+
app,
41+
"endTime",
42+
],
43+
},
44+
},
45+
async run({ $ }) {
46+
const {
47+
app,
48+
symbol,
49+
productType,
50+
limit,
51+
startTime,
52+
endTime,
53+
} = this;
54+
55+
const response = await app.getFutureMarketFillsHistory({
56+
$,
57+
params: {
58+
symbol,
59+
productType,
60+
limit,
61+
startTime,
62+
endTime,
63+
},
64+
});
65+
66+
$.export("$summary", `Successfully retrieved ${response?.data?.length || 0} historical fills for ${symbol}`);
67+
return response;
68+
},
69+
};
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import app from "../../bitget.app.mjs";
2+
3+
export default {
4+
key: "bitget-future-market-get-history-candle-data",
5+
name: "Future - Market - Get History Candle Data",
6+
description: "Retrieve historical candlestick data for a contract symbol. [See the documentation](https://www.bitget.com/api-doc/contract/market/Get-History-Candle-Data)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
symbol: {
12+
optional: false,
13+
propDefinition: [
14+
app,
15+
"symbol",
16+
],
17+
},
18+
productType: {
19+
propDefinition: [
20+
app,
21+
"productType",
22+
],
23+
},
24+
granularity: {
25+
propDefinition: [
26+
app,
27+
"granularity",
28+
],
29+
},
30+
startTime: {
31+
propDefinition: [
32+
app,
33+
"startTime",
34+
],
35+
},
36+
endTime: {
37+
propDefinition: [
38+
app,
39+
"endTime",
40+
],
41+
},
42+
limit: {
43+
type: "integer",
44+
label: "Limit",
45+
description: "Default: `100`, maximum: `200`",
46+
optional: true,
47+
min: 1,
48+
max: 200,
49+
},
50+
},
51+
async run({ $ }) {
52+
const {
53+
app,
54+
symbol,
55+
productType,
56+
granularity,
57+
startTime,
58+
endTime,
59+
limit,
60+
} = this;
61+
62+
const response = await app.getFutureMarketHistoryCandleData({
63+
$,
64+
params: {
65+
symbol,
66+
productType,
67+
granularity,
68+
startTime,
69+
endTime,
70+
limit,
71+
},
72+
});
73+
74+
$.export("$summary", `Successfully retrieved historical candle data points for \`${symbol}\``);
75+
return response;
76+
},
77+
};

0 commit comments

Comments
 (0)