@liquiditytech/rapidx-cli 1.0.26
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/README.md +81 -0
- package/dist/cli/audit.js +10 -0
- package/dist/cli/bin.js +41 -0
- package/dist/cli/commands/account.js +34 -0
- package/dist/cli/commands/algo.js +35 -0
- package/dist/cli/commands/auth.js +22 -0
- package/dist/cli/commands/config.js +46 -0
- package/dist/cli/commands/doctor.js +42 -0
- package/dist/cli/commands/index.js +73 -0
- package/dist/cli/commands/market.js +26 -0
- package/dist/cli/commands/order.js +81 -0
- package/dist/cli/commands/position.js +35 -0
- package/dist/cli/commands/schema.js +5 -0
- package/dist/cli/commands/self-check.js +24 -0
- package/dist/cli/commands/trade-gate.js +26 -0
- package/dist/cli/commands/trade.js +30 -0
- package/dist/cli/commands/update.js +27 -0
- package/dist/cli/envelope.js +29 -0
- package/dist/cli/help.js +34 -0
- package/dist/cli/invocation-checker.js +39 -0
- package/dist/cli/mcp-entry.js +4 -0
- package/dist/cli/parser.js +87 -0
- package/dist/core/audit/redaction.js +56 -0
- package/dist/core/audit/writer.js +27 -0
- package/dist/core/client/capability-executor.js +400 -0
- package/dist/core/client/rapid-x-client.js +156 -0
- package/dist/core/client/signing.js +24 -0
- package/dist/core/client/symbol.js +36 -0
- package/dist/core/config/credential.js +42 -0
- package/dist/core/config/resolve.js +24 -0
- package/dist/core/contracts/capabilities.js +77 -0
- package/dist/core/contracts/compatibility.js +65 -0
- package/dist/core/contracts/events.js +29 -0
- package/dist/core/contracts/evidence.js +7 -0
- package/dist/core/contracts/input-schema.js +370 -0
- package/dist/core/contracts/types.js +1 -0
- package/dist/core/errors/product-error.js +74 -0
- package/dist/core/index.js +24 -0
- package/dist/core/safety/policy.js +215 -0
- package/dist/core/safety/raw-api.js +19 -0
- package/dist/core/self-check/live-read-only-probes.js +25 -0
- package/dist/core/self-check/live-trading-verification-probes.js +252 -0
- package/dist/core/self-check/run-self-check.js +91 -0
- package/dist/core/trading/preview.js +330 -0
- package/dist/core/trading/trading-verification.js +137 -0
- package/dist/core/update/check-update.js +295 -0
- package/dist/core/version.js +1 -0
- package/dist/mcp/audit.js +10 -0
- package/dist/mcp/server.js +73 -0
- package/dist/mcp/tool-registry.js +31 -0
- package/dist/mcp/tool-runner.js +144 -0
- package/package.json +48 -0
- package/packages/distribution/docs/cli-only-agent.md +12 -0
- package/packages/distribution/docs/cli.md +49 -0
- package/packages/distribution/docs/index.md +58 -0
- package/packages/distribution/docs/mcp.md +36 -0
- package/packages/distribution/docs/quickstart.md +129 -0
- package/packages/distribution/docs/self-check.md +7 -0
- package/packages/distribution/docs/skills.md +140 -0
- package/packages/distribution/docs/tools.md +35 -0
- package/packages/distribution/docs/trading-verification.md +17 -0
- package/packages/distribution/docs/troubleshooting/index.md +27 -0
- package/packages/distribution/manifests/offline-manifest.json +26 -0
- package/packages/distribution/registry/rapidx.mcp.json +26 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# RapidX External Service
|
|
2
|
+
|
|
3
|
+
RapidX provides three layers:
|
|
4
|
+
|
|
5
|
+
- CLI: atomic `rapidx` operations.
|
|
6
|
+
- MCP: best-practice tool surface through `rapidx mcp serve`.
|
|
7
|
+
- Skills: agent-facing playbooks for configuration, review, self-check, and trading.
|
|
8
|
+
|
|
9
|
+
All layers share the same canonical capability registry from Core.
|
|
10
|
+
|
|
11
|
+
Use `tools.md` for the published capability summary.
|
|
12
|
+
|
|
13
|
+
Install the agent skills from the dedicated skills repository. Choose the command for the target agent host.
|
|
14
|
+
|
|
15
|
+
Codex:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
19
|
+
--skill ltp-rapidx-config \
|
|
20
|
+
--skill ltp-rapidx-trading \
|
|
21
|
+
-a codex -y
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Claude Code:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
28
|
+
--skill ltp-rapidx-config \
|
|
29
|
+
--skill ltp-rapidx-trading \
|
|
30
|
+
-a claude-code -y
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Gemini CLI:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
37
|
+
--skill ltp-rapidx-config \
|
|
38
|
+
--skill ltp-rapidx-trading \
|
|
39
|
+
-a gemini-cli -y
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use this only when the Gemini environment supports Agent Skills through the general skills installer.
|
|
43
|
+
|
|
44
|
+
OpenClaw:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
openclaw skills install ltp-rapidx-config
|
|
48
|
+
openclaw skills install ltp-rapidx-trading
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Hermes Agent:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-config
|
|
55
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-trading
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use `skills.md` for the full Agent install matrix and manual install paths.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# MCP
|
|
2
|
+
|
|
3
|
+
MCP server mode is started by the CLI:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
rapidx mcp serve
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The registry metadata must use:
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"command": "rapidx",
|
|
14
|
+
"args": ["mcp", "serve"],
|
|
15
|
+
"env": {
|
|
16
|
+
"LTP_ACCESS_KEY": "<your-access-key>",
|
|
17
|
+
"LTP_SECRET_KEY": "<your-secret-key>",
|
|
18
|
+
"LTP_API_HOST": "<provided-api-host>"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Public tool names use the `rapidx/` prefix.
|
|
24
|
+
|
|
25
|
+
Key trading tools:
|
|
26
|
+
|
|
27
|
+
- `rapidx/update/check` reads the RapidX release manifest and returns current/latest CLI version, minimum write version, skills update advice, and upgrade commands.
|
|
28
|
+
- `rapidx/self-check` can include update state when called with `{"checkUpdates": true}`.
|
|
29
|
+
- `rapidx/order/preview` creates preview tokens for `order.place`.
|
|
30
|
+
- `rapidx/order/place-preview`, `rapidx/order/amend-preview`, and `rapidx/order/cancel-preview` are concrete order preview aliases. Preview responses include `confirmation.submitToken`; pass it as `continueConsentId` when submitting the matching write tool.
|
|
31
|
+
- `rapidx/trade/preview` creates preview tokens for non-place trade writes by `targetCapabilityId`, including position, account, and algo writes.
|
|
32
|
+
- `rapidx/position/history` reads historical positions.
|
|
33
|
+
- `rapidx/account/set-position-mode` changes account position mode and requires preview plus explicit continuation consent.
|
|
34
|
+
- `rapidx/trade/verify-live` runs the optional small real-trade verification flow with `explicitUserConsent`; it creates its own internal preview and does not accept an external `previewId`. `rapidx/trading-verification` remains supported as a compatibility alias.
|
|
35
|
+
|
|
36
|
+
Agents must discover the full tool list through `rapidx/tools` and must not invent tool names.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Quickstart
|
|
2
|
+
|
|
3
|
+
You can install RapidX skills in two ways:
|
|
4
|
+
|
|
5
|
+
- Run the commands yourself.
|
|
6
|
+
- Send the install instructions to your agent and let the agent run the commands in its own workspace.
|
|
7
|
+
|
|
8
|
+
Send this to your agent if you want it to handle installation:
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
Install RapidX skills into your current workspace.
|
|
12
|
+
Use the installation method that matches your agent host.
|
|
13
|
+
Install ltp-rapidx-config and ltp-rapidx-trading.
|
|
14
|
+
Then follow ltp-rapidx-config to install @liquiditytech/rapidx-cli, configure credentials, choose MCP or CLI mode, and run read-only self-check.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
1. To install the skills yourself, choose the command for your agent host.
|
|
18
|
+
|
|
19
|
+
Codex:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
23
|
+
--skill ltp-rapidx-config \
|
|
24
|
+
--skill ltp-rapidx-trading \
|
|
25
|
+
-a codex -y
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Claude Code:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
32
|
+
--skill ltp-rapidx-config \
|
|
33
|
+
--skill ltp-rapidx-trading \
|
|
34
|
+
-a claude-code -y
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Gemini CLI:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
41
|
+
--skill ltp-rapidx-config \
|
|
42
|
+
--skill ltp-rapidx-trading \
|
|
43
|
+
-a gemini-cli -y
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use this command only when your Gemini environment supports Agent Skills through the general skills installer. Verified Gemini CLI builds may expose `gemini extensions`, not `gemini skills`.
|
|
47
|
+
|
|
48
|
+
OpenClaw:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
openclaw skills install ltp-rapidx-config
|
|
52
|
+
openclaw skills install ltp-rapidx-trading
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Hermes Agent:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-config
|
|
59
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-trading
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
For Cursor or OpenCode, use `npx skills add` with `-a cursor` or `-a opencode`. For manual installation, copy `skills/ltp-rapidx-config` and `skills/ltp-rapidx-trading` into the target agent's skills directory.
|
|
63
|
+
|
|
64
|
+
2. Install the RapidX CLI package from the official npm registry.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install -g @liquiditytech/rapidx-cli
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
3. Verify the bin:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
rapidx schema --json
|
|
74
|
+
rapidx update check --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
4. Configure credentials through the agent host secret mechanism or environment:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
LTP_ACCESS_KEY=<your-access-key>
|
|
81
|
+
LTP_SECRET_KEY=<your-secret-key>
|
|
82
|
+
LTP_API_HOST=<provided-api-host>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
5. Configure the agent workspace MCP server with:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"command": "rapidx",
|
|
90
|
+
"args": ["mcp", "serve"],
|
|
91
|
+
"env": {
|
|
92
|
+
"LTP_ACCESS_KEY": "<your-access-key>",
|
|
93
|
+
"LTP_SECRET_KEY": "<your-secret-key>",
|
|
94
|
+
"LTP_API_HOST": "<provided-api-host>"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
6. Run:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
rapidx self-check --read-only --json
|
|
103
|
+
rapidx self-check --read-only --check-updates --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Do not treat a missing real call as success. The correct status is `NOT_VERIFIED`.
|
|
107
|
+
|
|
108
|
+
7. Discover the canonical tool surface:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
rapidx schema --json
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For trade writes, create a preview before submit. Use `rapidx order place-preview` for `order.place`, `rapidx order amend-preview` for `order.amend`, and `rapidx order cancel-preview` for `order.cancel`. Use flat JSON with `rapidx trade preview` and `targetCapabilityId` for non-order writes such as `position.set-leverage`, `position.close`, or `account.set-position-mode`.
|
|
115
|
+
|
|
116
|
+
For clearer order flows, prefer the explicit aliases:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
rapidx order place-preview --input '{"symbol":"BINANCE_PERP_BTC_USDT","side":"BUY","orderType":"LIMIT","price":"65000","quantity":"0.001","maxNotional":"100","clientOrderId":"example-001"}' --json
|
|
120
|
+
rapidx order amend-preview --input '{"orderId":"<order-id>","price":"64900"}' --json
|
|
121
|
+
rapidx order cancel-preview --input '{"orderId":"<order-id>"}' --json
|
|
122
|
+
rapidx trade preview --input '{"targetCapabilityId":"position.set-leverage","symbol":"BINANCE_PERP_BTC_USDT","leverage":5}' --json
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
When submitting the actual write, pass the returned `previewId` and use `confirmation.submitToken` as `continueConsentId`.
|
|
126
|
+
|
|
127
|
+
`maxNotional` is a safety upper bound, not the target order amount. If a requested amount is below the symbol `minNotional`, ask the user to confirm the larger amount before submitting. For `position.close`, do not pass `side` or `quantity`; RapidX determines the close side from the current position and closes the target symbol/positionSide. Use a reduce-only order flow for partial closes, then check final exposure with `position list`.
|
|
128
|
+
|
|
129
|
+
Use `rapidx trade verify-live --json` only when the user explicitly authorizes a small real-trade verification. The older `rapidx self-check trade-verify --json` command remains supported for compatibility.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Self-check
|
|
2
|
+
|
|
3
|
+
Read-only self-check verifies discovery, schema compatibility, public market access, credential auth, account or balance read, order list, and position list when probes are available.
|
|
4
|
+
|
|
5
|
+
The self-check must never submit an order.
|
|
6
|
+
|
|
7
|
+
If a required real call cannot be made, return `NOT_VERIFIED`.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Skills
|
|
2
|
+
|
|
3
|
+
RapidX skills are distributed through GitHub, not through the CLI npm package.
|
|
4
|
+
|
|
5
|
+
Install them with the path that matches the target agent host. `npx skills add` is one supported installer, not the only installation method.
|
|
6
|
+
|
|
7
|
+
## Installation Paths
|
|
8
|
+
|
|
9
|
+
You can install RapidX skills in two ways:
|
|
10
|
+
|
|
11
|
+
- Run the install commands yourself.
|
|
12
|
+
- Send the install instructions to your agent and let the agent run the commands in its own workspace.
|
|
13
|
+
|
|
14
|
+
## Option A: Run Commands Yourself
|
|
15
|
+
|
|
16
|
+
## Agent Install Matrix
|
|
17
|
+
|
|
18
|
+
| Agent | Recommended install path | Skill locations or discovery path |
|
|
19
|
+
|-------|--------------------------|-----------------------------------|
|
|
20
|
+
| Codex | `$skill-installer` in Codex, or `npx skills add ... -a codex`. | `$skill-installer` installs into `$CODEX_HOME/skills`, default `~/.codex/skills`. Workspace skills may use `.agents/skills/`; admin installs may use `/etc/codex/skills`. |
|
|
21
|
+
| Claude Code | Copy to `.claude/skills/<name>/SKILL.md` or `~/.claude/skills/<name>/SKILL.md`, or use `npx skills add ... -a claude-code`. | `.claude/skills/`, `~/.claude/skills/`. |
|
|
22
|
+
| Cursor | `npx skills add ... -a cursor`, or copy to `.agents/skills/`, `.cursor/skills/`, or `~/.cursor/skills/`. | `.agents/skills/`, `.cursor/skills/`, `~/.cursor/skills/`. |
|
|
23
|
+
| Gemini CLI | Use `npx skills add ... -a gemini-cli` only if your environment supports the general skills installer. Current verified Gemini CLI builds expose `gemini extensions`, not `gemini skills`. | If native skills are unavailable, use RapidX CLI or MCP directly. |
|
|
24
|
+
| OpenCode | Copy to `.opencode/skills/`, `~/.config/opencode/skills/`, `.claude/skills/`, or `.agents/skills/`; or use `npx skills add ... -a opencode`. | Native, Claude-compatible, and agent-compatible paths. |
|
|
25
|
+
| OpenClaw | Install the published ClawHub skills by slug with `openclaw skills install <slug>`. | Workspace: `<workspace>/skills`; project-agent: `<workspace>/.agents/skills`; user: `~/.agents/skills`; managed: `~/.openclaw/skills`. |
|
|
26
|
+
| Hermes Agent | Install each skill by GitHub path with `hermes skills install LiquidityTech/ltp-rapidx-skill/skills/<name>`. | Default: `~/.hermes/skills/`; external skill dirs are also supported. |
|
|
27
|
+
|
|
28
|
+
## Codex
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
32
|
+
--skill ltp-rapidx-config \
|
|
33
|
+
--skill ltp-rapidx-trading \
|
|
34
|
+
-a codex -y
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Codex also supports installing from another repo through `$skill-installer`. Ask Codex to install both skills from `git@github.com:LiquidityTech/ltp-rapidx-skill.git`.
|
|
38
|
+
|
|
39
|
+
## Claude Code
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
43
|
+
--skill ltp-rapidx-config \
|
|
44
|
+
--skill ltp-rapidx-trading \
|
|
45
|
+
-a claude-code -y
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Manual install paths:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
.claude/skills/ltp-rapidx-config/SKILL.md
|
|
52
|
+
.claude/skills/ltp-rapidx-trading/SKILL.md
|
|
53
|
+
~/.claude/skills/ltp-rapidx-config/SKILL.md
|
|
54
|
+
~/.claude/skills/ltp-rapidx-trading/SKILL.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Cursor
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
61
|
+
--skill ltp-rapidx-config \
|
|
62
|
+
--skill ltp-rapidx-trading \
|
|
63
|
+
-a cursor -y
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Gemini CLI
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
70
|
+
--skill ltp-rapidx-config \
|
|
71
|
+
--skill ltp-rapidx-trading \
|
|
72
|
+
-a gemini-cli -y
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Use this only when your Gemini CLI environment supports Agent Skills through the general skills installer. The verified local Gemini CLI command surface exposes `gemini extensions`, not `gemini skills`.
|
|
76
|
+
|
|
77
|
+
## OpenCode
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git \
|
|
81
|
+
--skill ltp-rapidx-config \
|
|
82
|
+
--skill ltp-rapidx-trading \
|
|
83
|
+
-a opencode -y
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## OpenClaw
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
openclaw skills install ltp-rapidx-config
|
|
90
|
+
openclaw skills install ltp-rapidx-trading
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The recommended OpenClaw path is ClawHub slug installation. For local development, clone this repository and install `./skills/ltp-rapidx-config` and `./skills/ltp-rapidx-trading` as local skills.
|
|
94
|
+
|
|
95
|
+
## Hermes Agent
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-config
|
|
99
|
+
hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-trading
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Manual Installation
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
git clone git@github.com:LiquidityTech/ltp-rapidx-skill.git
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Copy both directories into the target agent's skill directory:
|
|
109
|
+
|
|
110
|
+
```text
|
|
111
|
+
skills/ltp-rapidx-config
|
|
112
|
+
skills/ltp-rapidx-trading
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Option B: Send This To Your Agent
|
|
116
|
+
|
|
117
|
+
Use this option when you want the agent to install RapidX skills itself. Send the message below to the agent:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
Install RapidX skills into your current workspace.
|
|
121
|
+
|
|
122
|
+
Use the installation method that matches your agent host:
|
|
123
|
+
- Codex: use $skill-installer or run npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git --skill ltp-rapidx-config --skill ltp-rapidx-trading -a codex -y
|
|
124
|
+
- Claude Code: run npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git --skill ltp-rapidx-config --skill ltp-rapidx-trading -a claude-code -y, or install both skill folders under .claude/skills/
|
|
125
|
+
- Cursor: run npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git --skill ltp-rapidx-config --skill ltp-rapidx-trading -a cursor -y
|
|
126
|
+
- Gemini CLI: if your environment supports the general skills installer, run npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git --skill ltp-rapidx-config --skill ltp-rapidx-trading -a gemini-cli -y; otherwise use RapidX CLI or MCP directly
|
|
127
|
+
- OpenCode: run npx skills add git@github.com:LiquidityTech/ltp-rapidx-skill.git --skill ltp-rapidx-config --skill ltp-rapidx-trading -a opencode -y
|
|
128
|
+
- OpenClaw: run openclaw skills install ltp-rapidx-config and openclaw skills install ltp-rapidx-trading
|
|
129
|
+
- Hermes: run hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-config and hermes skills install LiquidityTech/ltp-rapidx-skill/skills/ltp-rapidx-trading
|
|
130
|
+
- If none of these match, clone git@github.com:LiquidityTech/ltp-rapidx-skill.git and copy skills/ltp-rapidx-config and skills/ltp-rapidx-trading into your supported skills directory.
|
|
131
|
+
|
|
132
|
+
After installing the skills, follow ltp-rapidx-config to install @liquiditytech/rapidx-cli, configure RapidX credentials, choose MCP or CLI mode, and run read-only self-check.
|
|
133
|
+
Use the agent host's user-provided secret mechanism for API keys when available. Do not print or store full keys in public files, logs, screenshots, or normal chat output.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The config skill guides the agent to install `@liquiditytech/rapidx-cli`, configure credentials, register `rapidx mcp serve`, review access, and run read-only self-check.
|
|
137
|
+
|
|
138
|
+
The trading skill guides read flow, preview-first write flow, state confirmation, and small real-trade verification.
|
|
139
|
+
|
|
140
|
+
For existing installations, run `rapidx update check --json` or call `rapidx/update/check` through MCP before an integration review. Reinstall the GitHub-distributed skills when the update result sets `skillsUpdateRecommended=true`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Tool Surface
|
|
2
|
+
|
|
3
|
+
The canonical source is `rapidx schema --json` or `rapidx/tools`.
|
|
4
|
+
|
|
5
|
+
## Discovery And Update
|
|
6
|
+
|
|
7
|
+
- `rapidx/tools`: returns the MCP tool surface and schema metadata.
|
|
8
|
+
- `rapidx/self-check`: verifies discovery, schema, credentials, and optional read-only probes. Pass `checkUpdates=true` to include release manifest status.
|
|
9
|
+
- `rapidx/update/check`: reads the RapidX release manifest, returns version status, minimum write version, skills update advice, and upgrade commands.
|
|
10
|
+
|
|
11
|
+
## Preview Tools
|
|
12
|
+
|
|
13
|
+
- `rapidx/order/preview`: preview for `order.place`.
|
|
14
|
+
- `rapidx/order/place-preview`: explicit alias for `order.place` preview. It returns `previewId` plus `confirmation.submitToken`.
|
|
15
|
+
- `rapidx/order/amend-preview`: explicit alias for `order.amend` preview. Submit `rapidx/order/amend` with unchanged parameters, `previewId`, and `continueConsentId=confirmation.submitToken`.
|
|
16
|
+
- `rapidx/order/cancel-preview`: explicit alias for `order.cancel` preview. Submit `rapidx/order/cancel` with unchanged parameters, `previewId`, and `continueConsentId=confirmation.submitToken`.
|
|
17
|
+
- `rapidx/trade/preview`: generic preview for non-place trade writes, including position writes, account writes, and algo writes. Pass `targetCapabilityId`, then submit the target tool with unchanged parameters, `previewId`, and `continueConsentId`.
|
|
18
|
+
|
|
19
|
+
## Read Tools
|
|
20
|
+
|
|
21
|
+
- Market reads: ticker, orderbook, klines, funding rate, mark price, symbol info, and open interest.
|
|
22
|
+
- Account reads: overview and balance.
|
|
23
|
+
- Order reads: get, list, and history.
|
|
24
|
+
- Position reads: list and position history.
|
|
25
|
+
- Algo reads: list.
|
|
26
|
+
|
|
27
|
+
## Write Tools
|
|
28
|
+
|
|
29
|
+
- Order writes: place, amend, and cancel.
|
|
30
|
+
- Position writes: close and set leverage.
|
|
31
|
+
- Account writes: set position mode.
|
|
32
|
+
- Algo writes: place, amend, and cancel.
|
|
33
|
+
- Live verification: `rapidx/trade/verify-live` is the clearer alias for the small real-trade verification flow. `rapidx/trading-verification` remains supported for compatibility.
|
|
34
|
+
|
|
35
|
+
All write tools require preview where the schema marks `previewRequired: true`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Trading Verification
|
|
2
|
+
|
|
3
|
+
Small real-trade verification is optional and requires explicit user consent.
|
|
4
|
+
|
|
5
|
+
The expected flow is:
|
|
6
|
+
|
|
7
|
+
1. read-only self-check
|
|
8
|
+
2. market rule lookup
|
|
9
|
+
3. explicit consent
|
|
10
|
+
4. internal preview with `maxNotional`
|
|
11
|
+
5. post-only limit submit
|
|
12
|
+
6. order query
|
|
13
|
+
7. amend when supported
|
|
14
|
+
8. cancel
|
|
15
|
+
9. cleanup-check
|
|
16
|
+
|
|
17
|
+
Every step must include evidence.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
## RCLI
|
|
4
|
+
|
|
5
|
+
`RCLI13001` means the CLI rejected a complex invocation. Use the `rapidx` bin directly.
|
|
6
|
+
|
|
7
|
+
`RCLI25001` means the agent host preflight blocked execution before RapidX ran. Remove shell chaining or use MCP tools.
|
|
8
|
+
|
|
9
|
+
## RMCP
|
|
10
|
+
|
|
11
|
+
`RMCP20001` means trade consent is missing.
|
|
12
|
+
|
|
13
|
+
`RMCP20002` means preview is missing, expired, or mismatched.
|
|
14
|
+
|
|
15
|
+
## RCORE
|
|
16
|
+
|
|
17
|
+
`RCORE01001` means Portfolio credentials are missing.
|
|
18
|
+
|
|
19
|
+
`RCORE90002` means output or audit may contain secret material and must fail closed.
|
|
20
|
+
|
|
21
|
+
## RSKILL
|
|
22
|
+
|
|
23
|
+
`RSKILL12001` means the skill did not require evidence.
|
|
24
|
+
|
|
25
|
+
## RDIST
|
|
26
|
+
|
|
27
|
+
`RDIST30001` means registry metadata is not aligned with `rapidx mcp serve`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.26",
|
|
3
|
+
"artifacts": [
|
|
4
|
+
{
|
|
5
|
+
"name": "rapidx-mcp-registry",
|
|
6
|
+
"path": "packages/distribution/registry/rapidx.mcp.json",
|
|
7
|
+
"channel": "offline",
|
|
8
|
+
"checksum": "sha256:a27d7e64537c0b39574b06887e1a0f4a689851901614216a509fd19c04fdbf98",
|
|
9
|
+
"status": "ready"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "rapidx-quickstart-doc",
|
|
13
|
+
"path": "packages/distribution/docs/quickstart.md",
|
|
14
|
+
"channel": "offline",
|
|
15
|
+
"checksum": "sha256:7d8f511a5dbe803e7a19ede0be79f6bf1b77942dbafa45d0ce87fb3b098f7829",
|
|
16
|
+
"status": "ready"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "rapidx-tools-doc",
|
|
20
|
+
"path": "packages/distribution/docs/tools.md",
|
|
21
|
+
"channel": "offline",
|
|
22
|
+
"checksum": "sha256:ee6adae99a6facfd5f1c3dced86c7a28eafd11ecbe7e2a7eda159a6aa788a245",
|
|
23
|
+
"status": "ready"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rapidx",
|
|
3
|
+
"packageName": "@liquiditytech/rapidx-cli",
|
|
4
|
+
"version": "1.0.26",
|
|
5
|
+
"command": "rapidx",
|
|
6
|
+
"args": ["mcp", "serve"],
|
|
7
|
+
"launchCommand": "rapidx",
|
|
8
|
+
"launchArgs": ["mcp", "serve"],
|
|
9
|
+
"toolsPrefix": "rapidx/",
|
|
10
|
+
"schemaVersion": "2026-05-23",
|
|
11
|
+
"description": "RapidX production trading tools for MCP-capable agents.",
|
|
12
|
+
"manualConfigExample": {
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"rapidx": {
|
|
15
|
+
"command": "rapidx",
|
|
16
|
+
"args": ["mcp", "serve"],
|
|
17
|
+
"env": {
|
|
18
|
+
"LTP_ACCESS_KEY": "<your-access-key>",
|
|
19
|
+
"LTP_SECRET_KEY": "<your-secret-key>",
|
|
20
|
+
"LTP_API_HOST": "<provided-api-host>"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"safetyNotice": "Real trading requires explicit user consent, preview, and state confirmation."
|
|
26
|
+
}
|