Skip to main content
Glama

OKX-DEX-SDK MCP SSE Server

by 0xobedient
buildCrossChainSwap.ts•1.52 kB
import { Tool } from "./../../shared/types/tool"; import { CrossChainSwapParams } from "@okx-dex/okx-dex-sdk"; import { z } from "zod"; import { build_cross_chain_swap } from "../hooks"; export const buildCrossChainSwapToolParams = { fromChainIndex: z.string(), toChainIndex: z.string(), fromChainId: z.string(), toChainId: z.string(), fromTokenAddress: z.string(), toTokenAddress: z.string(), amount: z.string(), slippage: z.string(), userWalletAddress: z.string(), sort: z.string().optional(), dexIds: z.string().optional(), allowBridge: z.string().optional(), denyBridge: z.string().optional(), priceImpactProtectionPercentage: z.string().optional(), receiveAddress: z.string().optional(), referrerAddress: z.string().optional(), feePercent: z.string().optional(), onlyBridge: z.string().optional(), memo: z.string().optional(), }; export const buildCrossChainSwapToolZodParams = z.object({ ...buildCrossChainSwapToolParams, }); export type BuildCrossChainSwapToolParamType = z.infer< typeof buildCrossChainSwapToolZodParams >; export const buildCrossChainSwapTool: Tool< typeof buildCrossChainSwapToolParams, BuildCrossChainSwapToolParamType, string > = { name: "OKX_BRIDGE_BUILD_CROSS_CHAIN_SWAP", description: "Generate the data to execute a cross-chain swap.", parameters: { ...buildCrossChainSwapToolParams, }, callback: async (params: BuildCrossChainSwapToolParamType) => { return build_cross_chain_swap(params as CrossChainSwapParams); }, };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0xobedient/okx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server