gate-mcp 0.12.6 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tools/cross_ex.js +27 -27
- package/package.json +2 -2
package/dist/tools/cross_ex.js
CHANGED
|
@@ -126,15 +126,15 @@ export function registerCrossExTools(server) {
|
|
|
126
126
|
}, async ({ coin, amount, from, to, text }) => {
|
|
127
127
|
try {
|
|
128
128
|
requireAuth();
|
|
129
|
-
const {
|
|
130
|
-
const req = new
|
|
129
|
+
const { InlineObject11 } = await import('gate-api');
|
|
130
|
+
const req = new InlineObject11();
|
|
131
131
|
req.coin = coin;
|
|
132
132
|
req.amount = amount;
|
|
133
133
|
req.from = from;
|
|
134
134
|
req.to = to;
|
|
135
135
|
if (text !== undefined)
|
|
136
136
|
req.text = text;
|
|
137
|
-
const { body } = await new CrossExApi(createClient()).createCrossexTransfer({
|
|
137
|
+
const { body } = await new CrossExApi(createClient()).createCrossexTransfer({ inlineObject11: req });
|
|
138
138
|
return textContent(body);
|
|
139
139
|
}
|
|
140
140
|
catch (e) {
|
|
@@ -177,8 +177,8 @@ export function registerCrossExTools(server) {
|
|
|
177
177
|
}, async ({ symbol, side, type, qty, price, quote_qty, time_in_force, reduce_only, position_side, text }) => {
|
|
178
178
|
try {
|
|
179
179
|
requireAuth();
|
|
180
|
-
const {
|
|
181
|
-
const req = new
|
|
180
|
+
const { InlineObject12 } = await import('gate-api');
|
|
181
|
+
const req = new InlineObject12();
|
|
182
182
|
req.symbol = symbol;
|
|
183
183
|
req.side = side;
|
|
184
184
|
if (type !== undefined)
|
|
@@ -197,7 +197,7 @@ export function registerCrossExTools(server) {
|
|
|
197
197
|
req.positionSide = position_side;
|
|
198
198
|
if (text !== undefined)
|
|
199
199
|
req.text = text;
|
|
200
|
-
const { body } = await new CrossExApi(createClient()).createCrossexOrder({
|
|
200
|
+
const { body } = await new CrossExApi(createClient()).createCrossexOrder({ inlineObject12: req });
|
|
201
201
|
return textContent(body);
|
|
202
202
|
}
|
|
203
203
|
catch (e) {
|
|
@@ -223,13 +223,13 @@ export function registerCrossExTools(server) {
|
|
|
223
223
|
}, async ({ order_id, qty, price }) => {
|
|
224
224
|
try {
|
|
225
225
|
requireAuth();
|
|
226
|
-
const {
|
|
227
|
-
const req = new
|
|
226
|
+
const { InlineObject13 } = await import('gate-api');
|
|
227
|
+
const req = new InlineObject13();
|
|
228
228
|
if (qty !== undefined)
|
|
229
229
|
req.qty = qty;
|
|
230
230
|
if (price !== undefined)
|
|
231
231
|
req.price = price;
|
|
232
|
-
const { body } = await new CrossExApi(createClient()).updateCrossexOrder(order_id, {
|
|
232
|
+
const { body } = await new CrossExApi(createClient()).updateCrossexOrder(order_id, { inlineObject13: req });
|
|
233
233
|
return textContent(body);
|
|
234
234
|
}
|
|
235
235
|
catch (e) {
|
|
@@ -311,13 +311,13 @@ export function registerCrossExTools(server) {
|
|
|
311
311
|
}, async ({ exchange_type, from_coin, to_coin, from_amount }) => {
|
|
312
312
|
try {
|
|
313
313
|
requireAuth();
|
|
314
|
-
const {
|
|
315
|
-
const req = new
|
|
314
|
+
const { InlineObject14 } = await import('gate-api');
|
|
315
|
+
const req = new InlineObject14();
|
|
316
316
|
req.exchangeType = exchange_type;
|
|
317
317
|
req.fromCoin = from_coin;
|
|
318
318
|
req.toCoin = to_coin;
|
|
319
319
|
req.fromAmount = from_amount;
|
|
320
|
-
const { body } = await new CrossExApi(createClient()).createCrossexConvertQuote({
|
|
320
|
+
const { body } = await new CrossExApi(createClient()).createCrossexConvertQuote({ inlineObject14: req });
|
|
321
321
|
return textContent(body);
|
|
322
322
|
}
|
|
323
323
|
catch (e) {
|
|
@@ -329,10 +329,10 @@ export function registerCrossExTools(server) {
|
|
|
329
329
|
}, async ({ quote_id }) => {
|
|
330
330
|
try {
|
|
331
331
|
requireAuth();
|
|
332
|
-
const {
|
|
333
|
-
const req = new
|
|
332
|
+
const { InlineObject15 } = await import('gate-api');
|
|
333
|
+
const req = new InlineObject15();
|
|
334
334
|
req.quoteId = quote_id;
|
|
335
|
-
const { body } = await new CrossExApi(createClient()).createCrossexConvertOrder({
|
|
335
|
+
const { body } = await new CrossExApi(createClient()).createCrossexConvertOrder({ inlineObject15: req });
|
|
336
336
|
return textContent(body);
|
|
337
337
|
}
|
|
338
338
|
catch (e) {
|
|
@@ -362,15 +362,15 @@ export function registerCrossExTools(server) {
|
|
|
362
362
|
}, async ({ position_mode, account_mode, exchange_type }) => {
|
|
363
363
|
try {
|
|
364
364
|
requireAuth();
|
|
365
|
-
const {
|
|
366
|
-
const req = new
|
|
365
|
+
const { InlineObject16 } = await import('gate-api');
|
|
366
|
+
const req = new InlineObject16();
|
|
367
367
|
if (position_mode !== undefined)
|
|
368
368
|
req.positionMode = position_mode;
|
|
369
369
|
if (account_mode !== undefined)
|
|
370
370
|
req.accountMode = account_mode;
|
|
371
371
|
if (exchange_type !== undefined)
|
|
372
372
|
req.exchangeType = exchange_type;
|
|
373
|
-
const { body } = await new CrossExApi(createClient()).updateCrossexAccount({
|
|
373
|
+
const { body } = await new CrossExApi(createClient()).updateCrossexAccount({ inlineObject16: req });
|
|
374
374
|
return textContent(body);
|
|
375
375
|
}
|
|
376
376
|
catch (e) {
|
|
@@ -474,11 +474,11 @@ export function registerCrossExTools(server) {
|
|
|
474
474
|
}, async ({ symbol, leverage }) => {
|
|
475
475
|
try {
|
|
476
476
|
requireAuth();
|
|
477
|
-
const {
|
|
478
|
-
const req = new
|
|
477
|
+
const { InlineObject17 } = await import('gate-api');
|
|
478
|
+
const req = new InlineObject17();
|
|
479
479
|
req.symbol = symbol;
|
|
480
480
|
req.leverage = leverage;
|
|
481
|
-
const { body } = await new CrossExApi(createClient()).updateCrossexPositionsLeverage({
|
|
481
|
+
const { body } = await new CrossExApi(createClient()).updateCrossexPositionsLeverage({ inlineObject17: req });
|
|
482
482
|
return textContent(body);
|
|
483
483
|
}
|
|
484
484
|
catch (e) {
|
|
@@ -506,11 +506,11 @@ export function registerCrossExTools(server) {
|
|
|
506
506
|
}, async ({ symbol, leverage }) => {
|
|
507
507
|
try {
|
|
508
508
|
requireAuth();
|
|
509
|
-
const {
|
|
510
|
-
const req = new
|
|
509
|
+
const { InlineObject18 } = await import('gate-api');
|
|
510
|
+
const req = new InlineObject18();
|
|
511
511
|
req.symbol = symbol;
|
|
512
512
|
req.leverage = leverage;
|
|
513
|
-
const { body } = await new CrossExApi(createClient()).updateCrossexMarginPositionsLeverage({
|
|
513
|
+
const { body } = await new CrossExApi(createClient()).updateCrossexMarginPositionsLeverage({ inlineObject18: req });
|
|
514
514
|
return textContent(body);
|
|
515
515
|
}
|
|
516
516
|
catch (e) {
|
|
@@ -523,12 +523,12 @@ export function registerCrossExTools(server) {
|
|
|
523
523
|
}, async ({ symbol, position_side }) => {
|
|
524
524
|
try {
|
|
525
525
|
requireAuth();
|
|
526
|
-
const {
|
|
527
|
-
const req = new
|
|
526
|
+
const { InlineObject19 } = await import('gate-api');
|
|
527
|
+
const req = new InlineObject19();
|
|
528
528
|
req.symbol = symbol;
|
|
529
529
|
if (position_side !== undefined)
|
|
530
530
|
req.positionSide = position_side;
|
|
531
|
-
const { body } = await new CrossExApi(createClient()).closeCrossexPosition({
|
|
531
|
+
const { body } = await new CrossExApi(createClient()).closeCrossexPosition({ inlineObject19: req });
|
|
532
532
|
return textContent(body);
|
|
533
533
|
}
|
|
534
534
|
catch (e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gate-mcp",
|
|
3
3
|
"mcpName": "io.github.gateio-dev/gate-mcp",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.7",
|
|
5
5
|
"description": "Local (stdio) MCP server exposing Gate.com API v4 to any MCP-compatible client",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
42
|
-
"gate-api": "^7.2.
|
|
42
|
+
"gate-api": "^7.2.36",
|
|
43
43
|
"zod": "^3"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|