[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9MPA6F812W0EYG2H8W390":3,"skill-same:01M7D9MPA6F812W0EYG2H8W390":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M7D9MPA6F812W0EYG2H8W390","derive-api",null,"Trading and account access on Derive (v2, formerly Lyra), the onchain options and perps exchange, using an Ethereum wallet key held by the DIME credential proxy. Covers the whole flow: building the two digests Derive expects, getting them signed without ever holding the key, reading account state and positions, and placing and cancelling orders. Use for ANY request to api.lyra.finance or api-demo.lyra.finance — including \"place an order on Derive\", \"what are my Derive positions\", \"cancel my Derive orders\", or a 403 from the credential proxy on a Derive call. Read this BEFORE calling Derive: it says what to send in place of the signature, which you cannot work out from Derive's own documentation. Derive was called Lyra and its API still answers on lyra.finance; both names mean this venue.","tradeparadigm\u002Fdt-apps","tradeparadigm","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72768132?v=4","01M7D9KY0PDJW6NWY8P936YNEX","Paradigm","01M7D9KY1BYPTKX9MGQHZKW4BP",0,"MIT","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fderive\u002Fskills\u002Fderive-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: derive-api\ndescription: >\n  Trading and account access on Derive (v2, formerly Lyra), the onchain\n  options and perps exchange, using an Ethereum wallet key held by the DIME\n  credential proxy. Covers the whole flow: building the two digests Derive\n  expects, getting them signed without ever holding the key, reading account\n  state and positions, and placing and cancelling orders. Use for ANY request\n  to api.lyra.finance or api-demo.lyra.finance — including \"place an order on\n  Derive\", \"what are my Derive positions\", \"cancel my Derive orders\", or a 403\n  from the credential proxy on a Derive call. Read this BEFORE calling Derive:\n  it says what to send in place of the signature, which you cannot work out\n  from Derive's own documentation. Derive was called Lyra and its API still\n  answers on lyra.finance; both names mean this venue.\nmetadata:\n  author: tradeparadigm\n---\n\n# Derive\n\nOnchain options, perpetuals and spot. Public data is open; everything under\n`\u002Fprivate\u002F` is authenticated by a secp256k1 signature you produce.\n\nYou do not have the key. It is sealed in the credential proxy, and you ask the\nproxy to sign a digest you have computed. Everything below is about computing\nthe right digest.\n\n## Hosts\n\n| Environment | Host |\n|---|---|\n| Mainnet | `api.lyra.finance` |\n| Testnet | `api-demo.lyra.finance` |\n\nEvery call is `POST`, including reads. `\u002Fpublic\u002F*` needs nothing. `\u002Fprivate\u002F*`\nneeds the three headers below.\n\n## What you were given\n\nThe credential arrives as `CRED_\u003CNAME>` holding a `sign-…` placeholder, plus\n`CRED_\u003CNAME>_META` holding the non-secret facts:\n\n| Key | What it is |\n|---|---|\n| `owner` | The account that owns the position on Derive |\n| `signer` | The address whose key signs. The owner's, unless a session key was registered |\n| `subaccount_id` | The subaccount actions are taken against |\n\n## Asking the proxy to sign\n\nTwo things in the same request, and either alone is refused:\n\n1. The 32-byte digest, base64-encoded, in `X-Dime-Sign-\u003Cname>`. Take `\u003Cname>`\n   from the `CRED_\u003CNAME>` variable this credential arrived as, lowercased with\n   `_` written as `-`. The proxy strips this header before forwarding.\n2. The placeholder, written where the signature belongs.\n\n**Send the digest, not the message.** This scheme signs 32 bytes. Hand it\nanything else and the proxy refuses and says so. That is Derive's own model,\nnot a quirk of ours — their signing library signs a raw hash too.\n\nThe signature comes back as `r||s||v` in hex, 130 characters, with `v` as 27\nor 28. **Derive wants it `0x`-prefixed, so write `0x` in front of the\nplaceholder yourself** — the proxy substitutes only where the placeholder is.\n\n## You cannot hash this with what is installed\n\nEverything below needs **keccak256**, and nothing in the agent has it. Node's\n`crypto` offers `sha3-256`, which is a DIFFERENT hash — NIST padding, not\nKeccak padding. It returns a perfectly good 32 bytes, the proxy will sign\nthem, and Derive will reject the signature with nothing pointing at the cause.\nReaching for it is the single most expensive mistake available on this page.\n\nInstall `ethers` once, at the start of the task. It carries all three things\nthis venue needs — `keccak256`, the EIP-191 message hash, and the EIP-712\ntyped-data hash — so it replaces three separate dependencies:\n\n```sh\ncd ~\u002F.openclaw\u002Fworkspace && npm install --silent ethers\n```\n\nThe version in the name is the app's `version:`. If only an older one is\nthere, this file changed. Write the helper once, then call it for every\nprivate request:\n\n```sh\nrm -rf ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\nmkdir -p ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\nfind ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive -maxdepth 1 -name '*.mjs' -delete\ncat > ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs \u003C\u003C'EOF'\nimport { hashMessage } from 'ethers';\n\nconst V = Object.keys(process.env).find(k => (process.env[k] || '').startsWith('sign-derive'));\nif (!V) { console.error('no Derive sign- credential in the environment'); process.exit(2); }\n\n\u002F\u002F _META may be absent entirely, so default it rather than parsing undefined.\nconst META = JSON.parse(process.env[V + '_META'] || '{}');\nconst OWNER = process.env.OWNER || META.owner;\nif (!OWNER) { console.error('no owner address: pass OWNER=0x… or ask the user'); process.exit(2); }\n\nconst HDR = 'X-Dime-Sign-' + V.replace(\u002F^CRED_\u002F, '').toLowerCase().replaceAll('_', '-');\nconst HOST = \u002FTESTNET|DEMO\u002Fi.test(V) ? 'api-demo.lyra.finance' : 'api.lyra.finance';\n\n\u002F\u002F EIP-191 personal_sign over the timestamp STRING. hashMessage applies the\n\u002F\u002F \"\\x19Ethereum Signed Message:\\n\u003Clen>\" prefix and keccak256 for us — the two\n\u002F\u002F places this is easy to get wrong by hand.\nconst ts = Date.now().toString();\nconst digest = hashMessage(ts);\n\nconst res = await fetch(`https:\u002F\u002F${HOST}${process.env.TARGET}`, {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'X-LyraWallet': OWNER,\n    'X-LyraTimestamp': ts,                  \u002F\u002F the one that was signed\n    'X-LyraSignature': '0x' + process.env[V],\n    [HDR]: Buffer.from(digest.slice(2), 'hex').toString('base64'),\n  },\n  body: process.env.BODY || `{\"wallet\": \"${OWNER}\"}`,\n});\nconsole.log(res.status, await res.text());\nEOF\n```\n\n`tools\u002Fderive\u002Fderive-api\u002F` belongs to this skill and holds this one file.\nThe `rm -rf` clears it, so a script an earlier chat wrote there goes\ntoo. Do not put your own scripts in it. The `find` deletes a helper\nleft at the flat path an earlier version of this skill used.\n\n## Start by finding the subaccount id\n\nAlmost every other private call needs a `subaccount_id`, and the credential\noften does not carry one — it is an optional detail the user may have left\nblank. Ask Derive rather than asking the user:\n\n```sh\nTARGET=\u002Fprivate\u002Fget_subaccounts node ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs\n```\n\n```\n200 {\"result\": {\"wallet\": \"0xEDE0…f7A4\", \"subaccount_ids\": [73340]}, \"id\": \"…\"}\n```\n\nThis is also the cheapest way to prove the whole signing path works, because\nit needs nothing but the owner address. Everything after it is one line:\n\n```sh\nTARGET=\u002Fprivate\u002Fget_subaccount BODY='{\"subaccount_id\": 73340}' \\\n  node ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs\n```\n\nThe `0x` in front of the placeholder is written by the helper, because the\nproxy substitutes only where the placeholder itself sits and Derive wants the\nprefix.\n\n**When this block and reality disagree, reality wins.** Change the smallest\nthing that makes it work, run it, and say in one line what you changed. Do not\nstop to ask, and do not run it unchanged to prove it fails.\n\n## Digest one: a private REST call\n\nEvery `\u002Fprivate\u002F*` call carries three headers:\n\n| Header | Value |\n|---|---|\n| `X-LyraWallet` | the `owner` address |\n| `X-LyraTimestamp` | current time in **milliseconds**, as a decimal string |\n| `X-LyraSignature` | the signature over that timestamp string |\n\nThe digest is EIP-191 `personal_sign` over the timestamp string — the string,\nnot the number:\n\n```\nmsg    = \"1790243017651\"\ndigest = keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(msg) + msg)\n```\n\n`len(msg)` is the byte length as a decimal string, so `13` here.\n\n```http\nPOST \u002Fprivate\u002Fget_account HTTP\u002F1.1\nHost: api.lyra.finance\nContent-Type: application\u002Fjson\nX-Dime-Sign-derive-wallet-key: \u003Cbase64 of the 32-byte digest>\nX-LyraWallet: 0x1a2b…\nX-LyraTimestamp: 1790243017651\nX-LyraSignature: 0xsign-derive-wallet-key-7Kj2mQx9vBn4rTz8wLpAeF\n\n{\"subaccount_id\": 12345}\n```\n\nThe timestamp you sign and the timestamp you send must be the same one.\nDerive rejects a stale one.\n\n## Digest two: an order, transfer or withdrawal\n\nThese are onchain actions and are signed as EIP-712 typed data, in addition to\nthe session headers above. The signature goes in the request body as\n`signature`.\n\n```\nactionHash = keccak256(abi.encode(\n    ACTION_TYPEHASH,   \u002F\u002F bytes32, from Derive's Protocol Constants\n    subaccount_id,     \u002F\u002F uint\n    nonce,             \u002F\u002F uint\n    module_address,    \u002F\u002F address, per action type\n    keccak256(module_data),\n    signature_expiry_sec,\n    owner,             \u002F\u002F address\n    signer))           \u002F\u002F address\n\ndigest = keccak256(0x1901 || DOMAIN_SEPARATOR || actionHash)\n```\n\n`DOMAIN_SEPARATOR`, `ACTION_TYPEHASH` and each `module_address` come from the\nProtocol Constants table in Derive's docs, and differ between mainnet and\ntestnet. `module_data` is the ABI encoding of the action itself — the fields\nand their order are per module, so read Derive's docs for the one you are\nperforming.\n\nThe `nonce` is `\u003CUTC ms>\u003C3-6 random digits>`, for example `1695836058725001`.\n`signature_expiry_sec` must be more than five minutes ahead.\n\nThe body carries `subaccount_id`, `nonce`, `signer`, `signature_expiry_sec`,\n`signature`, and the module's own fields.\n\n## If a call is refused\n\n| What you see | What it means |\n|---|---|\n| Proxy says the payload is not a digest | You sent the message. Hash it first. |\n| Derive rejects a signature that looks well formed | You hashed with `sha3-256` instead of `keccak256`. They are different hashes and both return 32 bytes, so nothing upstream can tell. Use `ethers`. |\n| `JSON.parse` throws on `undefined` | `CRED_\u003CNAME>_META` is not set. It is not required — default it to `{}` and pass `OWNER=0x…` instead |\n| You have no `subaccount_id` | It is an optional detail and may be blank. Call `\u002Fprivate\u002Fget_subaccounts`; do not ask the user |\n| Proxy 403 | The placeholder and the `X-Dime-Sign-…` header were not both present, or the path is not under `\u002Fprivate\u002F` |\n| Derive `14020`\u002F`14021` | `X-LyraWallet` is missing or does not match the subaccount |\n| Derive `11022` | The timestamp is stale, or you signed a different one from the one you sent |\n| Derive rejects the signature on an action | Usually the wrong `ACTION_TYPEHASH`, `module_address` or `DOMAIN_SEPARATOR` for the environment |\n\n## What this is not\n\nDerive is a venue in its own right. A Paradigm block trade or RFQ is a\ndifferent skill even if it settles somewhere similar.\n","# Derive\n\nOnchain options, perpetuals and spot. Public data is open; everything under\n`\u002Fprivate\u002F` is authenticated by a secp256k1 signature you produce.\n\nYou do not have the key. It is sealed in the credential proxy, and you ask the\nproxy to sign a digest you have computed. Everything below is about computing\nthe right digest.\n\n## Hosts\n\n| Environment | Host |\n|---|---|\n| Mainnet | `api.lyra.finance` |\n| Testnet | `api-demo.lyra.finance` |\n\nEvery call is `POST`, including reads. `\u002Fpublic\u002F*` needs nothing. `\u002Fprivate\u002F*`\nneeds the three headers below.\n\n## What you were given\n\nThe credential arrives as `CRED_\u003CNAME>` holding a `sign-…` placeholder, plus\n`CRED_\u003CNAME>_META` holding the non-secret facts:\n\n| Key | What it is |\n|---|---|\n| `owner` | The account that owns the position on Derive |\n| `signer` | The address whose key signs. The owner's, unless a session key was registered |\n| `subaccount_id` | The subaccount actions are taken against |\n\n## Asking the proxy to sign\n\nTwo things in the same request, and either alone is refused:\n\n1. The 32-byte digest, base64-encoded, in `X-Dime-Sign-\u003Cname>`. Take `\u003Cname>`\n   from the `CRED_\u003CNAME>` variable this credential arrived as, lowercased with\n   `_` written as `-`. The proxy strips this header before forwarding.\n2. The placeholder, written where the signature belongs.\n\n**Send the digest, not the message.** This scheme signs 32 bytes. Hand it\nanything else and the proxy refuses and says so. That is Derive's own model,\nnot a quirk of ours — their signing library signs a raw hash too.\n\nThe signature comes back as `r||s||v` in hex, 130 characters, with `v` as 27\nor 28. **Derive wants it `0x`-prefixed, so write `0x` in front of the\nplaceholder yourself** — the proxy substitutes only where the placeholder is.\n\n## You cannot hash this with what is installed\n\nEverything below needs **keccak256**, and nothing in the agent has it. Node's\n`crypto` offers `sha3-256`, which is a DIFFERENT hash — NIST padding, not\nKeccak padding. It returns a perfectly good 32 bytes, the proxy will sign\nthem, and Derive will reject the signature with nothing pointing at the cause.\nReaching for it is the single most expensive mistake available on this page.\n\nInstall `ethers` once, at the start of the task. It carries all three things\nthis venue needs — `keccak256`, the EIP-191 message hash, and the EIP-712\ntyped-data hash — so it replaces three separate dependencies:\n\n```sh\ncd ~\u002F.openclaw\u002Fworkspace && npm install --silent ethers\n```\n\nThe version in the name is the app's `version:`. If only an older one is\nthere, this file changed. Write the helper once, then call it for every\nprivate request:\n\n```sh\nrm -rf ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\nmkdir -p ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\nfind ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive -maxdepth 1 -name '*.mjs' -delete\ncat > ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs \u003C\u003C'EOF'\nimport { hashMessage } from 'ethers';\n\nconst V = Object.keys(process.env).find(k => (process.env[k] || '').startsWith('sign-derive'));\nif (!V) { console.error('no Derive sign- credential in the environment'); process.exit(2); }\n\n\u002F\u002F _META may be absent entirely, so default it rather than parsing undefined.\nconst META = JSON.parse(process.env[V + '_META'] || '{}');\nconst OWNER = process.env.OWNER || META.owner;\nif (!OWNER) { console.error('no owner address: pass OWNER=0x… or ask the user'); process.exit(2); }\n\nconst HDR = 'X-Dime-Sign-' + V.replace(\u002F^CRED_\u002F, '').toLowerCase().replaceAll('_', '-');\nconst HOST = \u002FTESTNET|DEMO\u002Fi.test(V) ? 'api-demo.lyra.finance' : 'api.lyra.finance';\n\n\u002F\u002F EIP-191 personal_sign over the timestamp STRING. hashMessage applies the\n\u002F\u002F \"\\x19Ethereum Signed Message:\\n\u003Clen>\" prefix and keccak256 for us — the two\n\u002F\u002F places this is easy to get wrong by hand.\nconst ts = Date.now().toString();\nconst digest = hashMessage(ts);\n\nconst res = await fetch(`https:\u002F\u002F${HOST}${process.env.TARGET}`, {\n  method: 'POST',\n  headers: {\n    'Content-Type': 'application\u002Fjson',\n    'X-LyraWallet': OWNER,\n    'X-LyraTimestamp': ts,                  \u002F\u002F the one that was signed\n    'X-LyraSignature': '0x' + process.env[V],\n    [HDR]: Buffer.from(digest.slice(2), 'hex').toString('base64'),\n  },\n  body: process.env.BODY || `{\"wallet\": \"${OWNER}\"}`,\n});\nconsole.log(res.status, await res.text());\nEOF\n```\n\n`tools\u002Fderive\u002Fderive-api\u002F` belongs to this skill and holds this one file.\nThe `rm -rf` clears it, so a script an earlier chat wrote there goes\ntoo. Do not put your own scripts in it. The `find` deletes a helper\nleft at the flat path an earlier version of this skill used.\n\n## Start by finding the subaccount id\n\nAlmost every other private call needs a `subaccount_id`, and the credential\noften does not carry one — it is an optional detail the user may have left\nblank. Ask Derive rather than asking the user:\n\n```sh\nTARGET=\u002Fprivate\u002Fget_subaccounts node ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs\n```\n\n```\n200 {\"result\": {\"wallet\": \"0xEDE0…f7A4\", \"subaccount_ids\": [73340]}, \"id\": \"…\"}\n```\n\nThis is also the cheapest way to prove the whole signing path works, because\nit needs nothing but the owner address. Everything after it is one line:\n\n```sh\nTARGET=\u002Fprivate\u002Fget_subaccount BODY='{\"subaccount_id\": 73340}' \\\n  node ~\u002F.openclaw\u002Fworkspace\u002Ftools\u002Fderive\u002Fderive-api\u002Fderive-api-1.0.3.mjs\n```\n\nThe `0x` in front of the placeholder is written by the helper, because the\nproxy substitutes only where the placeholder itself sits and Derive wants the\nprefix.\n\n**When this block and reality disagree, reality wins.** Change the smallest\nthing that makes it work, run it, and say in one line what you changed. Do not\nstop to ask, and do not run it unchanged to prove it fails.\n\n## Digest one: a private REST call\n\nEvery `\u002Fprivate\u002F*` call carries three headers:\n\n| Header | Value |\n|---|---|\n| `X-LyraWallet` | the `owner` address |\n| `X-LyraTimestamp` | current time in **milliseconds**, as a decimal string |\n| `X-LyraSignature` | the signature over that timestamp string |\n\nThe digest is EIP-191 `personal_sign` over the timestamp string — the string,\nnot the number:\n\n```\nmsg    = \"1790243017651\"\ndigest = keccak256(\"\\x19Ethereum Signed Message:\\n\" + len(msg) + msg)\n```\n\n`len(msg)` is the byte length as a decimal string, so `13` here.\n\n```http\nPOST \u002Fprivate\u002Fget_account HTTP\u002F1.1\nHost: api.lyra.finance\nContent-Type: application\u002Fjson\nX-Dime-Sign-derive-wallet-key: \u003Cbase64 of the 32-byte digest>\nX-LyraWallet: 0x1a2b…\nX-LyraTimestamp: 1790243017651\nX-LyraSignature: 0xsign-derive-wallet-key-7Kj2mQx9vBn4rTz8wLpAeF\n\n{\"subaccount_id\": 12345}\n```\n\nThe timestamp you sign and the timestamp you send must be the same one.\nDerive rejects a stale one.\n\n## Digest two: an order, transfer or withdrawal\n\nThese are onchain actions and are signed as EIP-712 typed data, in addition to\nthe session headers above. The signature goes in the request body as\n`signature`.\n\n```\nactionHash = keccak256(abi.encode(\n    ACTION_TYPEHASH,   \u002F\u002F bytes32, from Derive's Protocol Constants\n    subaccount_id,     \u002F\u002F uint\n    nonce,             \u002F\u002F uint\n    module_address,    \u002F\u002F address, per action type\n    keccak256(module_data),\n    signature_expiry_sec,\n    owner,             \u002F\u002F address\n    signer))           \u002F\u002F address\n\ndigest = keccak256(0x1901 || DOMAIN_SEPARATOR || actionHash)\n```\n\n`DOMAIN_SEPARATOR`, `ACTION_TYPEHASH` and each `module_address` come from the\nProtocol Constants table in Derive's docs, and differ between mainnet and\ntestnet. `module_data` is the ABI encoding of the action itself — the fields\nand their order are per module, so read Derive's docs for the one you are\nperforming.\n\nThe `nonce` is `\u003CUTC ms>\u003C3-6 random digits>`, for example `1695836058725001`.\n`signature_expiry_sec` must be more than five minutes ahead.\n\nThe body carries `subaccount_id`, `nonce`, `signer`, `signature_expiry_sec`,\n`signature`, and the module's own fields.\n\n## If a call is refused\n\n| What you see | What it means |\n|---|---|\n| Proxy says the payload is not a digest | You sent the message. Hash it first. |\n| Derive rejects a signature that looks well formed | You hashed with `sha3-256` instead of `keccak256`. They are different hashes and both return 32 bytes, so nothing upstream can tell. Use `ethers`. |\n| `JSON.parse` throws on `undefined` | `CRED_\u003CNAME>_META` is not set. It is not required — default it to `{}` and pass `OWNER=0x…` instead |\n| You have no `subaccount_id` | It is an optional detail and may be blank. Call `\u002Fprivate\u002Fget_subaccounts`; do not ask the user |\n| Proxy 403 | The placeholder and the `X-Dime-Sign-…` header were not both present, or the path is not under `\u002Fprivate\u002F` |\n| Derive `14020`\u002F`14021` | `X-LyraWallet` is missing or does not match the subaccount |\n| Derive `11022` | The timestamp is stale, or you signed a different one from the one you sent |\n| Derive rejects the signature on an action | Usually the wrong `ACTION_TYPEHASH`, `module_address` or `DOMAIN_SEPARATOR` for the environment |\n\n## What this is not\n\nDerive is a venue in its own right. A Paradigm block trade or RFQ is a\ndifferent skill even if it settles somewhere similar.\n",{"name":5,"metadata":24,"description":25},{"author":9},"Trading and account access on Derive (v2, formerly Lyra), the onchain options and perps exchange, using an Ethereum wallet key held by the DIME credential proxy. Covers the whole flow: building the two digests Derive expects, getting them signed without ever holding the key, reading account state and positions, and placing and cancelling orders. Use for ANY request to api.lyra.finance or api-demo.lyra.finance — including \"place an order on Derive\", \"what are my Derive positions\", \"cancel my Derive orders\", or a 403 from the credential proxy on a Derive call. Read this BEFORE calling Derive: it says what to send in place of the signature, which you cannot work out from Derive's own documentation. Derive was called Lyra and its API still answers on lyra.finance; both names mean this venue.\n","main","4befefc366f86a32c20711cf3798aaf13df1cd59","apps\u002Fderive\u002Fskills\u002Fderive-api","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps","https:\u002F\u002Fgithub.com\u002Ftradeparadigm","https:\u002F\u002Fparadigm.co\u002F","2026-11-13 17:14:22",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add tradeparadigm\u002Fdt-apps --skill derive-api",{"tool":39,"command":40},"bunx","bunx skills add tradeparadigm\u002Fdt-apps --skill derive-api",{"tool":42,"command":43},"pnpm","pnpm dlx skills add tradeparadigm\u002Fdt-apps --skill derive-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fderive\u002Fskills\u002Fderive-api\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M7D9RW0ZFXNH3MCGZE2B9WHY","example-api","A skill body that exists so the fixture is a complete app. It teaches nothing and is never published.","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fscripts\u002Ftestdata\u002Fapps\u002Fexample\u002Fskills\u002Fexample-api\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7D9RN7GJCJR5QA2ZCE4MPTH","telegram-bot","Send messages, photos and files to Telegram through the user's own bot, using a bot token held by the DIME credential proxy. Covers finding the chats the bot can reach, posting to a private chat, group or channel, editing and deleting what it sent, and sending from a data feed. Use for ANY request to message, notify or alert the user on Telegram, \"send this to my Telegram\", \"post alerts to my channel\", or a 403 from the credential proxy on api.telegram.org.","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Ftelegram\u002Fskills\u002Ftelegram-bot\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7D9R7K7RPTJ4T7DZRHXD156","paradigm-rfq-trader","Trigger institutional block trades via Paradigm's DRFQv2 flow. The workflow is venue-agnostic — resolve instruments, build the RFQ \u002F order payload, benchmark, run a confirmation gate, submit, verify settlement. Per-venue specifics (fair-value sources, naming conventions, edge syntax, settlement checks) live in references\u002Fvenues.md. In scope today: PRDX (Paradex, primary focus) and DBT (Deribit). Adding more DRFQv2 venues is a references\u002Fvenues.md edit, not a skill-body change. Covers takers (build, benchmark, cross) and makers (poll, price, manage). Every state-changing action goes through an explicit confirmation gate. Needs both Paradigm credentials enrolled. Use when the user asks to \"send a Paradigm block RFQ\", \"block-trade X BTC\", \"send a BTC straddle on Paradex \u002F Deribit\", \"quote rfq_X\", \"hit the best bid\", \"cancel rfq_X\". Does NOT cover pricing a structure without trading (its legs' current marks are paradigm-data-discovery's), small central-order-book trades, post-trade analysis (paradigm-block-analyst), historical tape (paradigm-data-discovery).","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fparadigm\u002Fskills\u002Fparadigm-rfq-trader\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7D9QV6WFQDW717AXTW7GJKE","paradigm-options-recap","Options market recap for a requested or default window, invoked via \u002Frecap. Parses \"\u002Frecap [asset] [options] [window]\" (e.g. \"\u002Frecap btc options 8h\") and builds the fixed four-section recap — Snapshot, Biggest Print, Block Flow, Vol Surface — from bounded raw exchange venue files and source tapes, never from Dime hot files, read with the pod's AWS access. Use when the user types \u002Frecap or asks for a market recap, an options flow summary, \"what happened in BTC options\" or \"last Xh of flow\". A single question is not a recap: the biggest print across venues is paradigm-data-discovery's (paradigm-api reads only Paradigm's own tape), and the vol surface, one IV or one venue's data is paradigm-data-discovery's, as are dataset inventory, schema and historical lookups. The output format is fixed — always the same four sections in the same order.","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fparadigm\u002Fskills\u002Fparadigm-options-recap\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7D9QJYMTHRTDVJFW3AC0HDN","paradigm-data-discovery","Catalog and query launcher for raw market data available to Dime in s3:\u002F\u002Fdt-exchange-venue-data, s3:\u002F\u002Fdt-paradigm-data, and s3:\u002F\u002Fdt-paradex-data, read with the pod's AWS access. Use for data inventory, coverage, schema and historical analysis, for current venue market data (marks, IV, greeks, OI, funding, spot) on Deribit, OKX, Bybit and Bullish, and for recent block trades when the user has no Paradigm credentials enrolled (with them, paradigm-api reads the live tape). Explains the per-venue raw files and lets the model choose the bounded reads needed for the question. Does not cover account state, positions, vaults, or order placement.","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fparadigm\u002Fskills\u002Fparadigm-data-discovery\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7D9Q3F60BDBMC8PEGH1VBZG","paradigm-block-analyst","Cross-venue analysis of Paradigm RFQ block trades using live market data from Deribit, OKX, and Bybit. Invoked as `\u002Fanalyze \u003Crfq_id> \u003Crfq description>`: resolves the rfq_id by searching the Paradigm trade tape via the paradigm-data-discovery skill (the daily execution partitions, keyed by RFQ_ID) for the cleared-block record, then fetches live marks, IVs, and greeks per venue, computes net greeks for multi-leg structures, benchmarks the fill vs mark, reports how much of the structure traded over 24h \u002F 7d \u002F 30d and where else it printed, reads whether the flow moved the vol surface, and outputs a concise analysis. Use when the user runs `\u002Fanalyze \u003Crfq_id> ...`, pastes a Paradigm block trade JSON, or asks to analyze, benchmark, or get market color on a Paradigm RFQ execution. Covers outright calls\u002Fputs (CL\u002FPL), strangles (SN), straddles (ST), butterflies (BF), condors (CO), calendars (CA), risk reversals (RR), covered calls, and custom multi-leg combos (CM). Also handles perp combos. Reads the Paradigm trade tape from S3 with the pod's AWS access.","https:\u002F\u002Fgithub.com\u002Ftradeparadigm\u002Fdt-apps\u002Fblob\u002Fmain\u002Fapps\u002Fparadigm\u002Fskills\u002Fparadigm-block-analyst\u002FSKILL.md",[],[]]