Nexus trading labs

From BankrBot/skills · View interactive version

Nexus trading labs is an AI agent skill from the GitHub repository BankrBot/skills. Non-custodial perpetual DEX on Arbitrum with an autonomous trading agent. Use when user says buy, sell, trade, long, short, open position, close position, flip trade, set leverage, deposit USDC, withdraw funds, check balance, view positions, cancel order, copy a thesis, publish trade on-chain, check

How to use this skill

Skill file

Nexus Trading Labs — Agent Skill

⚠️ CRITICAL — READ THIS BEFORE ANYTHING ELSE

Every authenticated action requires a wallet signature. Get it once, reuse for the session.

Step 1 — request_additional_tools({ names: ["sign_message"] })
Step 2 — commit_to_tools({ keep: ["sign_message"] })
Step 3 — sign_message({ message: "nexus-trading-key-v1" }) → save as walletSig
         also capture walletAddress from the connected wallet

⛔ DO NOT skip this. No walletSig = 401 error on every authenticated endpoint.

⛔ DO NOT ask the user for a signature. You have sign_message — use it yourself.


⛔ FORBIDDEN


Trade (most common action)

POST https://og.nexustradinglabs.com/trade
{
  "symbol":      "PERP_BTC_USDC",   // or shorthand "BTC"
  "side":        "BUY",             // or "SELL"
  "notional":    50,                // USD size
  "leverage":    5,
  "walletSig":   "<from sign_message>",
  "walletAddress": "<connected wallet>"
}

If response is { error: "wallet_not_registered" } → run Registration Flow (see references/trading.md).

To attach SL/TP after fill: POST /set-sl-tp (see references/trading.md — never put SL/TP in /trade).


Autonomous Agent

Deploy a bot that trades a funding + OI-divergence confluence signal 24/7 within the

user's risk limits. The key is order-only — it can trade but NEVER withdraw.

Default to PAPER (simulated, zero risk). Going AUTONOMOUS (live) ALWAYS needs

explicit user confirmation.

POST https://og.nexustradinglabs.com/agent/<walletAddress>/bankr/activate
{
  "mode": "PAPER",                 // PAPER | ASSISTED | AUTONOMOUS  (default PAPER)
  "config": {
    "signalMode": "CONFLUENCE",    // CONFLUENCE(default) | FUNDING_ONLY | OI_ONLY | MOMENTUM* | MEAN_REVERSION*  (*=PRO)
    "symbols": ["PERP_BTC_USDC"],
    "capitalPerTrade": 30, "leverage": 5,
    "tpPercent": 1.5, "slPercent": 0.75, "maxHoldHours": 4,
    "maxTradesPerDay": 10, "maxDailyLossUsdc": 5,
    "fundingThreshold": 0.01,      // % — signal sensitivity
    "oiChangeThreshold": 0,        // % min OI move to count
    "priceChangeThreshold": 0.5    // % move for MOMENTUM / MEAN_REVERSION
  },
  "walletSig": "<required for ASSISTED/AUTONOMOUS>",
  "confirm": "GO LIVE"             // REQUIRED only when mode is AUTONOMOUS
}

order-only key from walletSig — pass the session signature.

Nexus PRO — if the user isn't PRO, say so and default to CONFLUENCE. The free

strategies are CONFLUENCE, FUNDING_ONLY, OI_ONLY. All thresholds are user-tunable.

user FIRST, then resend with confirm:"GO LIVE".

unmanaged — offer KILL instead if a position is open). Kill (close + stop): POST /agent/<wallet>/kill.

(ALL modes, incl. PAPER), mode change, config update, deactivate, and kill. These are account-control

actions — the server ecrecovers the sig and rejects (401 walletSig_required) unless it resolves to the

agent's own wallet. Pass walletSig in the JSON body (NEVER a query string). Only GET /agent/<wallet> is

public. Reuse the session signature you already hold — no need to re-sign per call.

margin-reject (Orderly -1101). Read balance first and suggest a safe size.

See references/agent.md for the full intent map, status formatting, and safety rules.


Strategy Presets — deploy a proven edge by name

The agent isn't a black box. Nexus ships named, config-locked strategies with HONEST labels

(what's validated vs. experimental). When the user says "deploy your best strategy" / "what's

winning" / "run the proven one", quote the label truthfully and load the config — deploy is the

SAME bankr/activate call, just pass the preset's config. Default PAPER (proves the edge

risk-free before real funds).

◆ Regime-Gated Invert — VALIDATED LEAD (not proven). The first config to clear our

cross-market walk-forward: it FADES the funding+OI confluence, but only in the regimes where

fading actually pays (high volatility, non-Asia session). ~60% win, positive expectancy,

net-positive out-of-sample. Still a young sample (~20 trades) → a validated LEAD, **not

"proven". PAPER starts this wallet's own forward clock, risk-free — it does not** appear

on /agents/leaderboard; only AUTONOMOUS settled trades do.

{ "signalMode": "CONFLUENCE", "invertSignal": true,
  "symbols": ["PERP_BTC_USDC","PERP_ETH_USDC","PERP_SOL_USDC","PERP_HYPE_USDC"],
  "fundingThreshold": 0.01, "oiChangeThreshold": 1,
  "minVolAtrPct": 0.7, "tradeSessions": ["US","EUROPE"], "maxSignalAgeSec": 180,
  "leverage": 5, "capitalPerTrade": 50, "tpPercent": 2, "slPercent": 1,
  "maxHoldHours": 4, "maxTradesPerDay": 4, "maxDailyLossUsdc": 5 }

Other presets (free unless marked PRO) — load the same way: Funding Harvester (conservative,

BTC), Blue-Chip Confluence (BTC+ETH), OI Divergence Hunter, Funding Scalper

(aggressive), BTC Funding Fade (experimental), Momentum Rider (PRO · trend), **Mean

Reversion Fade** (PRO · fade).

⚠️ Label honestly. "VALIDATED LEAD" is not "proven"; an experiment is an experiment. Never

sell a backtest as a guarantee — that honesty IS the brand ("verify, don't trust").

Don't guess what's winning — READ the live graded record:

(win rate, net PnL, profit factor, days active). Quote the actual numbers.


Advanced agent config (all optional, user-tunable)

Beyond signalMode + thresholds, the agent supports full risk/exec control — add any of these to

the config on activate or PUT /agent/:wallet/config:

trailingStopPct, breakevenTriggerPct (move stop to entry after +X%). Hard-stop priority

(SL → timeout → trail) always beats TP.

entries), minVolAtrPct + tradeSessions (["US","EUROPE","ASIA"]) + maxSignalAgeSec (only a

FRESH signal), fundingPercentileMin (only top-percentile funding extremes).

safetyOrderStepScale, safetyOrderVolumeScale} — the whole ladder fits inside capitalPerTrade`;

the slPercent stop only fires once the ladder is spent.

print it (last 4 chars max), keep it in an approved secret store, HTTPS only, rotate via

POST /agent/:wallet/webhook/rotate, revoke via .../webhook/disable if leaked (enable via

.../webhook/enable, owner-authed, PRO). `POST /agent/hook/:token {action: BUY|SELL|CLOSE, symbol,

passphrase} — the passphrase` is a shared label, NOT cryptographic auth. **Webhook signals

default to PAPER / record-only**; a live order requires the "Live activation gate" below. Validate a

strict schema (known action, known symbol); reject unknown fields and duplicates. Nonce / replay

dedup is NOT enforced in this skill — do not claim it; if a duplicate can't be ruled out, fail closed.

switch, and the order-only key that cannot withdraw.


Live activation gate (AUTONOMOUS / live config)

PAPER stays low-friction — deploy, tune, and iterate freely. Going live is gated. Before ANY

live activate, a mode → AUTONOMOUS flip, or a config update on an already-live agent, the agent MUST:

  1. Show the complete effective config + worst-case exposure and wait for the user to read it:

symbols + market IDs, leverage, notional per entry, the full DCA ladder (each step's size + trigger

and the total committed), TP allocation (must sum ≤ 100%), stop behavior, max trades/day, max daily

loss, estimated fees, and liquidation risk vs. free collateral.

  1. Locally reject before sending: out-of-range values, takeProfits summing > 100%, malformed DCA,

or capitalPerTrade above ~60% of free collateral (or the user's prior cap). Fix or abort — don't send.

  1. Show the risk disclosure and get an explicit acknowledgement (verbatim, below).
  2. Only then send with confirm: "GO LIVE". Missing confirm OR acknowledgement → fail closed.

Required risk disclosure — show before any GO LIVE:

⚠️ Leveraged perpetuals can lose your entire posted collateral — and more — through liquidation.

A walk-forward result on a small (~20-trade) sample, and any backtest, do NOT predict future returns.

Funding, liquidity, oracle, slippage, and liquidation risks all apply. This is not investment advice.

The user must acknowledge that disclosure before you send confirm: "GO LIVE". PAPER needs none of this.


Proof — the design, stated honestly

What separates Nexus from "trust me it works" agents is the grading method — never a claim the

agent has checked the chain itself:

(first-touch TP vs SL), not self-reported — so anyone can recompute the numbers from public data.

/agents/standing, plus labels and win rates, are what the API reports. Do NOT call them

"verified" or "trustless proof complete." The ledger is SHA-256 hashed and the API states its root is

anchored on Arbitrum One (chainId 42161) at contract 0x57a698df84a44F3dA3dac3E08CA455a55A4eff84.

log and matched root + block, say: "claimed by API; inspect the contract on Arbiscan" and link

https://arbiscan.io/address/0x57a698df84a44F3dA3dac3E08CA455a55A4eff84. That link is a **pointer for

the human to inspect** — not a completed verification.

treasury (the Nexus Safe), which accumulates $NEXUS and holds. Say "the onchain treasury" — never

quote a dollar figure.

switch. Frame it as "inspect it yourself," not "we've proven it."


Quick Reference

⚠️ ALWAYS use the full URL: https://og.nexustradinglabs.com

| Action | Full URL | Auth |

|---|---|---|

| Place trade | POST https://og.nexustradinglabs.com/trade | walletSig |

| Close position | POST https://og.nexustradinglabs.com/close-position | walletSig |

| Attach SL/TP | POST https://og.nexustradinglabs.com/set-sl-tp | walletSig |

| Cancel order | POST https://og.nexustradinglabs.com/cancel | walletSig |

| Order status | POST https://og.nexustradinglabs.com/order-status | walletSig |

| Order history | POST https://og.nexustradinglabs.com/order-history | walletSig |

| Positions | POST https://og.nexustradinglabs.com/positions | walletSig |

| Balance | POST https://og.nexustradinglabs.com/balance | walletSig |

| Set leverage | POST https://og.nexustradinglabs.com/set-leverage | walletSig |

| Deposit USDC | POST https://og.nexustradinglabs.com/proxy/bankr-deposit | Bankr API key |

| Withdraw USDC | POST https://og.nexustradinglabs.com/proxy/bankr-withdraw | Bankr API key + walletSig |

| Settle PnL | POST https://og.nexustradinglabs.com/settle-pnl | walletSig |

| Register wallet | POST https://og.nexustradinglabs.com/proxy/bankr-register | Bankr API key |

| Publish thesis on-chain | POST https://og.nexustradinglabs.com/proxy/thesis-register | Bankr API key |

| Index a registration you sent yourself | POST https://og.nexustradinglabs.com/theses/index | None (txHash + wallet) |

| Where my calls stand (state + live distances) | GET https://og.nexustradinglabs.com/theses/status/:wallet | None |

| Deploy / arm agent | POST https://og.nexustradinglabs.com/agent/:wallet/bankr/activate | walletSig (all modes) |

| Change agent mode | POST https://og.nexustradinglabs.com/agent/:wallet/bankr/mode | walletSig |

| Update agent config | PUT https://og.nexustradinglabs.com/agent/:wallet/config | walletSig |

| Agent status | GET https://og.nexustradinglabs.com/agent/:wallet | public read |

| Deactivate agent | DELETE https://og.nexustradinglabs.com/agent/:wallet | walletSig (in body) |

| Kill agent (close + stop) | POST https://og.nexustradinglabs.com/agent/:wallet/kill | walletSig (in body) |

| Top agents (live graded) | GET https://og.nexustradinglabs.com/agents/leaderboard | public |

| Agent standing | GET https://og.nexustradinglabs.com/agents/standing/:wallet | public |

| Agent ledger (on-chain proof) | GET https://og.nexustradinglabs.com/agents/ledger | public |

| Enable agent webhook (PRO) | POST https://og.nexustradinglabs.com/agent/:wallet/webhook/enable | walletSig |

| Fire webhook signal (PRO) | POST https://og.nexustradinglabs.com/agent/hook/:token | token in URL |

| Mark price | GET https://og.nexustradinglabs.com/mark-price?symbol=BTC | public |

| Funding rate | GET https://og.nexustradinglabs.com/funding-rate?symbol=BTC | public |

| 24h stats | GET https://og.nexustradinglabs.com/24h-stats?symbol=BTC | public |

| Public feed | GET https://og.nexustradinglabs.com/feed | public |

| Trader lab | GET https://og.nexustradinglabs.com/lab/:wallet | public read |

| Trader profile | GET https://og.nexustradinglabs.com/profile/:wallet | public read |

| Caller board (graded) | GET https://og.nexustradinglabs.com/theses/leaderboard | public |

| One trader's graded record | GET https://og.nexustradinglabs.com/theses/process/:wallet | public |

| Market intel | GET https://api-evm.orderly.org/v1/public/futures | public |

| Crypto news | rss2json proxy (see references/news.md) | public |


Load References As Needed

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.