This endpoint submits signed Polymarket orders for execution and returns an order acceptance result.All wallet types are supported. The signatureType inside the signed order object identifies the wallet type used for signing:
signatureType
Wallet Type
Notes
0
EOA
Default for py-clob-client with a raw private key. Fully supported on V1 and V2 (sign V2 orders with aion_sdk.build_v2_signed_order).
1
POLY_PROXY
Polymarket proxy wallet
2
GNOSIS_SAFE
Multi-sig wallet
3
POLY_1271 / Deposit Wallet
Polymarket deposit wallet (1271 contract)
The backend infers V1 vs. V2 from the verifyingContract used at signing time — V1 and V2 share the same 12-field EIP-712 Order struct. It does not require signatureType=3 to use V2.For Deposit Wallets specifically (signatureType=3), the registered credential must also be stored with signatureType=3 via POST /wallet/credentials.For immediate BUY orders (FAK / FOK), Polymarket enforces precision constraints:
makerAmount supports max 2 decimals
takerAmount supports max 4 decimals
Because amounts are sent as 6-decimal micro-units, validate before submitting:
Agent must be registered via POST /agents/register
Wallet credentials registered via POST /wallet/credentials
EIP712-signed order:
V2 markets (current default) — sign with aion_sdk.build_v2_signed_order(...) from aion-sdk >= 0.10.3 with the signing extra. Versions ≤ 0.10.1 had a V2 signing bug (wrong domain version + 3 spurious typed-data fields) and are rejected by CLOB with Invalid order payload. 0.10.3 adds a neg_risk parameter and hard-fails on signer/private-key mismatches, eliminating the most common Deposit Wallet failure mode. py-clob-client (≤ 0.34.6) signs the V1 verifying contract and is also rejected.
V1 markets (legacy) — either signer works; py-clob-client.create_order(...) is fine.
signatureType in the signed order matches the actual wallet type (0=EOA / 1=Proxy / 2=Safe / 3=Deposit Wallet). Do not hard-code signatureType=3 for non-deposit wallets — the signature will fail to verify.
Market context checked via GET /markets/context/:marketId (recommended)
Deprecated fields: earlier docs and aion-sdk ≤ 0.10.1 listed timestamp / metadata / builder as V2-only fields. They are not part of the on-chain Order struct or the EIP-712 typed data; including them in the signed digest causes Polymarket CLOB to return Invalid order payload. Upgrade to aion-sdk >= 0.10.3. The fields are still accepted in inbound HTTP payloads for back-compat but are silently dropped before forwarding to CLOB.
signer vs maker (Deposit Wallet trap, signatureType=3): the maker is the deposit wallet contract address, but signer MUST be the EOA address that owns it — i.e. Account.from_key(private_key).address. The CLOB recovers the ECDSA signer from the signature and compares it against the signer field; if they differ you get Invalid order payload. The same rule applies to signatureType=1 (Proxy) and signatureType=2 (Safe). For signatureType=0 (EOA) maker == signer == EOA. SDK >= 0.10.3 raises a ValueError instead of producing such an order.
The signatureType value must match the actual wallet that produced the signature.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AI Agent API","colors":{"primary":"#1E40AF","light":"#3B82F6","dark":"#1E3A8A"},"logo":{"light":"https://mintcdn.com/aionmarket/DvcBhshWShrT8_IW/logo/light.svg?fit=max\u0026auto=format\u0026n=DvcBhshWShrT8_IW\u0026q=85\u0026s=e05b9570e21b72c5833ff7ade71bbe39","dark":"https://mintcdn.com/aionmarket/DvcBhshWShrT8_IW/logo/dark.svg?fit=max\u0026auto=format\u0026n=DvcBhshWShrT8_IW\u0026q=85\u0026s=ff8d2d101fdff120da95c7dd348ccc21"},"favicon":"https://mintcdn.com/aionmarket/i61Jc2fDFjhf-6Sy/favicon.svg?fit=max\u0026auto=format\u0026n=i61Jc2fDFjhf-6Sy\u0026q=85\u0026s=75039ff47eaad2beeb5ef051c90eddac","navbar":{"links":[{"href":"https://github.com/aionmarket/aion-sdk","label":"Aion-Sdk"}],"primary":{"type":"button","label":"Get Started","href":"/quickstart"}},"footer":{"socials":{"github":"https://github.com/aionmarket"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/aionmarket"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"aionmarket","hasAudioNarration":false,"actualSubdomain":"aionmarket","customDomains":["docs.aionmarket.com"],"gitSource":{"type":"github","owner":"aionmarket","repo":"docs","deployBranch":"main","isPrivate":false,"contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21dcf97005524106c9d1a1","collectionId":"9160c6d1-3fbd-4938-ac25-35d3eb2661f0","schemaVersion":"v2"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a21dcf97005524106c9d1a1:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API Reference","count":43},{"language":"default","tag":"Documentation","count":14},{"language":"default","tag":"Market Operations","count":7},{"language":"default","tag":"Wallet","count":7},{"language":"default","tag":"Order Management","count":6},{"language":"default","tag":"Core Concepts","count":5},{"language":"default","tag":"Operations Guides","count":4},{"language":"default","tag":"Agent Management","count":3},{"language":"default","tag":"Trading","count":3},{"language":"default","tag":"Skills","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/place-trade","slug":"/api-reference/endpoint/place-trade","pageMetadata":{"title":"Trade","openapi":"POST /markets/trade","description":"Submit a new market order or limit order for execution.","href":"/api-reference/endpoint/place-trade"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Submit a new market order or limit order for execution.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,blockquote:`blockquote`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Execute a trade order on Polymarket using an EIP712-signed order object.`}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`This endpoint submits signed Polymarket orders for execution and returns an order acceptance result.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`All wallet types are supported.`}),` The `,_jsx(_components.code,{children:`signatureType`}),` inside the signed `,_jsx(_components.code,{children:`order`}),` object identifies the wallet type used for signing:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`signatureType`}),_jsx(_components.th,{children:`Wallet Type`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0`})}),_jsx(_components.td,{children:`EOA`}),_jsxs(_components.td,{children:[`Default for `,_jsx(_components.code,{children:`py-clob-client`}),` with a raw private key. Fully supported on V1 and V2 (sign V2 orders with `,_jsx(_components.code,{children:`aion_sdk.build_v2_signed_order`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`1`})}),_jsx(_components.td,{children:`POLY_PROXY`}),_jsx(_components.td,{children:`Polymarket proxy wallet`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2`})}),_jsx(_components.td,{children:`GNOSIS_SAFE`}),_jsx(_components.td,{children:`Multi-sig wallet`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`3`})}),_jsx(_components.td,{children:`POLY_1271 / Deposit Wallet`}),_jsx(_components.td,{children:`Polymarket deposit wallet (1271 contract)`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The backend infers V1 vs. V2 from the `,_jsx(_components.code,{children:`verifyingContract`}),` used at signing time — V1 and V2 share the `,_jsx(_components.strong,{children:`same 12-field EIP-712 Order struct`}),`. It does `,_jsx(_components.strong,{children:`not`}),` require `,_jsx(_components.code,{children:`signatureType=3`}),` to use V2.`]}),`\n`,_jsxs(_components.p,{children:[`For Deposit Wallets specifically (`,_jsx(_components.code,{children:`signatureType=3`}),`), the registered credential must also be stored with `,_jsx(_components.code,{children:`signatureType=3`}),` via `,_jsx(_components.code,{children:`POST /wallet/credentials`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`For immediate BUY orders (`,_jsx(_components.code,{children:`FAK`}),` / `,_jsx(_components.code,{children:`FOK`}),`), Polymarket enforces precision constraints:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`makerAmount`}),` supports max 2 decimals`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`takerAmount`}),` supports max 4 decimals`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Because amounts are sent as 6-decimal micro-units, validate before submitting:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`makerAmount % 10000 == 0`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`takerAmount % 100 == 0`})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Agent must be registered`}),` via `,_jsx(_components.code,{children:`POST /agents/register`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Wallet credentials registered`}),` via `,_jsx(_components.code,{children:`POST /wallet/credentials`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`EIP712-signed order`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V2 markets (current default)`}),` — sign with `,_jsx(_components.code,{children:`aion_sdk.build_v2_signed_order(...)`}),` from `,_jsx(_components.a,{href:`https://pypi.org/project/aion-sdk/`,children:_jsx(_components.code,{children:`aion-sdk`})}),` >= `,_jsx(_components.strong,{children:`0.10.3`}),` with the `,_jsx(_components.code,{children:`signing`}),` extra. Versions ≤ 0.10.1 had a V2 signing bug (wrong domain version + 3 spurious typed-data fields) and are rejected by CLOB with `,_jsx(_components.code,{children:`Invalid order payload`}),`. `,_jsx(_components.code,{children:`0.10.3`}),` adds a `,_jsx(_components.code,{children:`neg_risk`}),` parameter and hard-fails on signer/private-key mismatches, eliminating the most common Deposit Wallet failure mode. `,_jsx(_components.code,{children:`py-clob-client`}),` (≤ 0.34.6) signs the V1 verifying contract and is also rejected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`V1 markets (legacy)`}),` — either signer works; `,_jsx(_components.code,{children:`py-clob-client.create_order(...)`}),` is fine.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`signatureType`}),` in the signed order matches the actual wallet type`]}),` (`,_jsx(_components.code,{children:`0`}),`=EOA / `,_jsx(_components.code,{children:`1`}),`=Proxy / `,_jsx(_components.code,{children:`2`}),`=Safe / `,_jsx(_components.code,{children:`3`}),`=Deposit Wallet). Do not hard-code `,_jsx(_components.code,{children:`signatureType=3`}),` for non-deposit wallets — the signature will fail to verify.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Market context checked`}),` via `,_jsx(_components.code,{children:`GET /markets/context/:marketId`}),` (recommended)`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`request-fields`,children:`Request fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`venue`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Defaults to `,_jsx(_components.code,{children:`polymarket`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`marketConditionId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Condition identifier`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`marketQuestion`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Market question`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outcome`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`YES`}),` or `,_jsx(_components.code,{children:`NO`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orderSize`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Requested contracts`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`price`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Price per contract`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isLimitOrder`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Limit or market mode`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orderType`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`GTC`}),`, `,_jsx(_components.code,{children:`FOK`}),`, `,_jsx(_components.code,{children:`GTD`}),`, `,_jsx(_components.code,{children:`FAK`}),` (default: `,_jsx(_components.code,{children:`GTC`}),` for limit, `,_jsx(_components.code,{children:`FAK`}),` for market)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`walletAddress`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Wallet address`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`orderVersion`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`1`}),`=legacy V1, `,_jsx(_components.code,{children:`2`}),`=Polymarket V2; auto-inferred if omitted`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`order`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Signed EIP712 order payload`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reasoning`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Trade explanation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Strategy source tag`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`skillSlug`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Skill identifier for attribution`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expirationTime`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Limit order expiration (milliseconds)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tickSize`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`V2 tick size: `,_jsx(_components.code,{children:`0.1`}),`, `,_jsx(_components.code,{children:`0.01`}),`, `,_jsx(_components.code,{children:`0.001`}),`, `,_jsx(_components.code,{children:`0.0001`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`negRisk`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`V2 market context flag`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`funderAddress`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`V2 funder address`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`postOnly`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Post-only order flag`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`deferExec`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Defer execution flag`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`owner`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`No`}),_jsx(_components.td,{children:`Polymarket owner (default uses wallet credential apiKey)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`feeAmount`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Market order fee (`,_jsx(_components.code,{children:`isLimitOrder=false`}),` only)`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`curl`,id:`curl`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://www.aionmarket.com/bvapi/markets/trade`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"venue\": \"polymarket\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"marketConditionId\": \"0xabc123...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"marketQuestion\": \"Will Bitcoin reach $100k by end of 2024?\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outcome\": \"YES\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orderSize\": 10,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\": 0.68,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"isLimitOrder\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"walletAddress\": \"0x1111111111111111111111111111111111111111\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orderVersion\": 2,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"owner\": \"f4f247b7-4ac7-ff29-a152-04fda0a8755a\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orderType\": \"GTC\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"deferExec\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"postOnly\": false,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maker\": \"0x1111111111111111111111111111111111111111\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signer\": \"0x1111111111111111111111111111111111111111\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"taker\": \"0x0000000000000000000000000000000000000000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tokenId\": \"0x123\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"makerAmount\": \"6800000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"takerAmount\": \"10000000\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"side\": \"BUY\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expiration\": \"1713604800\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"nonce\": \"0\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"feeRateBps\": \"0\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\": \"0x...\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"salt\": 1,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signatureType\": 3`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"feeAmount\": 0,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reasoning\": \"Technical analysis shows bullish trend; RSI at 65\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"source\": \"sdk:weather-alpha\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"skillSlug\": \"polymarket-weather-trader\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expirationTime\": 0`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),_jsx(Tab,{title:`Python SDK`,id:`python-sdk`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` aion_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AionMarketClient`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AionMarketClient(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.aionmarket.com/bvapi\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`signed_order `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"maker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xDEPOSIT_WALLET_CONTRACT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# wallet contract on Polygon`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xEOA_ADDRESS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# EOA owning the deposit wallet (matches private_key)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"taker\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x0000000000000000000000000000000000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tokenId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xTOKEN_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"makerAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6100000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"takerAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"10000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"side\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BUY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expiration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1713604800\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"nonce\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"feeRateBps\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"salt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"signatureType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Deposit Wallet`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.trade({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"venue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"polymarket\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"marketConditionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xabc123...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"marketQuestion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Will Bitcoin reach $100k by end of 2024?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outcome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YES\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orderSize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.68`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"isLimitOrder\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"orderType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GTC\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"walletAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xYOUR_WALLET\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: signed_order,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reasoning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Positive edge after context check\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sdk:strategy-alpha\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result)`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`order-object-eip712-signed`,children:`Order Object (EIP712 Signed)`}),`\n`,_jsxs(_components.p,{children:[`Required fields inside `,_jsx(_components.code,{children:`order`}),` (V1 and V2 share the same 12-field schema):`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`maker`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Maker wallet address`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`signer`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Signing wallet address`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`taker`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Taker address, usually zero address for open orders`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`tokenId`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Polymarket CLOB token ID`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`makerAmount`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Maker amount in 6-decimal integer precision`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`takerAmount`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Taker amount in 6-decimal integer precision`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`side`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`BUY`}),` or `,_jsx(_components.code,{children:`SELL`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`expiration`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Expiration timestamp in seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`nonce`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Unique nonce (use `,_jsx(_components.code,{children:`\"0\"`}),` if unused)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`feeRateBps`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Fee rate in basis points (use `,_jsx(_components.code,{children:`\"0\"`}),` for default)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`signature`}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`EIP712 signature`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`salt`}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`Random salt`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`signatureType`}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`0`}),`=EOA, `,_jsx(_components.code,{children:`1`}),`=PolymarketProxy, `,_jsx(_components.code,{children:`2`}),`=GnosisSafe, `,_jsx(_components.code,{children:`3`}),`=POLY_1271`]})]})]})]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Deprecated fields:`}),` earlier docs and `,_jsx(_components.code,{children:`aion-sdk ≤ 0.10.1`}),` listed `,_jsx(_components.code,{children:`timestamp`}),` / `,_jsx(_components.code,{children:`metadata`}),` / `,_jsx(_components.code,{children:`builder`}),` as V2-only fields. They are `,_jsx(_components.strong,{children:`not`}),` part of the on-chain Order struct or the EIP-712 typed data; including them in the signed digest causes Polymarket CLOB to return `,_jsx(_components.code,{children:`Invalid order payload`}),`. Upgrade to `,_jsx(_components.code,{children:`aion-sdk >= 0.10.3`}),`. The fields are still accepted in inbound HTTP payloads for back-compat but are silently dropped before forwarding to CLOB.`]}),`\n`]}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`signer`}),` vs `,_jsx(_components.code,{children:`maker`}),` (Deposit Wallet trap, `,_jsx(_components.code,{children:`signatureType=3`}),`):`]}),` the `,_jsx(_components.code,{children:`maker`}),` is the deposit wallet `,_jsx(_components.strong,{children:`contract`}),` address, but `,_jsx(_components.code,{children:`signer`}),` MUST be the `,_jsx(_components.strong,{children:`EOA`}),` address that owns it — i.e. `,_jsx(_components.code,{children:`Account.from_key(private_key).address`}),`. The CLOB recovers the ECDSA signer from the signature and compares it against the `,_jsx(_components.code,{children:`signer`}),` field; if they differ you get `,_jsx(_components.code,{children:`Invalid order payload`}),`. The same rule applies to `,_jsx(_components.code,{children:`signatureType=1`}),` (Proxy) and `,_jsx(_components.code,{children:`signatureType=2`}),` (Safe). For `,_jsx(_components.code,{children:`signatureType=0`}),` (EOA) `,_jsx(_components.code,{children:`maker == signer == EOA`}),`. SDK >= 0.10.3 raises a `,_jsx(_components.code,{children:`ValueError`}),` instead of producing such an order.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`signatureType`}),` value must match the actual wallet that produced the signature.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x456def...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"live\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"orderVersion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"collateralSymbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pUSD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"walletAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x1111111111111111111111111111111111111111\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"signatureType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"aiAgentId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"userId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"42\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"syncedToMkOrder\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"syncedToStrategyLog\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`common-errors`,children:`Common errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsx(_components.td,{children:`Invalid payload, bad market/outcome, or invalid order object`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`401`})}),_jsx(_components.td,{children:`Invalid API key`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`429`})}),_jsx(_components.td,{children:`Rate limited`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`500`})}),_jsx(_components.td,{children:`Server-side failure`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`error-handling`,children:`Error Handling`}),`\n`,_jsx(_components.p,{children:`Common response codes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`201`}),`: Request accepted (use response body `,_jsx(_components.code,{children:`success`}),` to determine downstream execution result)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`400`}),`: Invalid market/outcome or insufficient balance`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`401`}),`: Invalid API key or expired`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`429`}),`: Rate limited`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`500`}),`: Server error`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`pre-trade-checklist`,children:`Pre-Trade Checklist`}),`\n`,_jsx(_components.p,{children:`Before placing trade orders:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Get Market Context`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`GET`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` /markets/context/:marketId?user=YOUR_WALLET`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check Risk Warnings`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Review suggested thresholds`}),`\n`,_jsx(_components.li,{children:`Check position limits`}),`\n`,_jsx(_components.li,{children:`Verify daily trade quota`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Verify Market Status`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Market must be active`}),`\n`,_jsx(_components.li,{children:`Resolution date must not have passed`}),`\n`,_jsx(_components.li,{children:`Sufficient liquidity`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Sign Order`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use EIP712 signing`}),`\n`,_jsx(_components.li,{children:`Verify expiration time`}),`\n`,_jsx(_components.li,{children:`Double-check amounts`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Execute Trade`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Submit signed order`}),`\n`,_jsx(_components.li,{children:`Monitor for fill status`}),`\n`,_jsx(_components.li,{children:`Log reasoning for audit`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /markets/context/:marketId`}),` - Pre-trade risk analysis`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /markets/orders/open`}),` - Monitor pending orders`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /markets/orders/cancel`}),` - Cancel unfilled orders`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET /agents/me`}),` - Check daily trade quota used`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`POST /markets/redeem`}),` - Claim rewards on settled markets`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Size Appropriately`}),`: Start small and scale up`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Set Realistic Prices`}),`: High bid-ask spreads reduce match probability`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor Fills`}),`: Check order status frequently`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Update Reasoning`}),`: Clear logic improves trust`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cancel Stale Orders`}),`: Clean up old orders regularly`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Record Strategy`}),`: Track all trades for analysis`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Trade","openapi":"POST /markets/trade","description":"Submit a new market order or limit order for execution.","href":"/api-reference/endpoint/place-trade"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Request fields","slug":"request-fields","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]},{"title":"Order Object (EIP712 Signed)","slug":"order-object-eip712-signed","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Common errors","slug":"common-errors","depth":2,"children":[]},{"title":"Error Handling","slug":"error-handling","depth":2,"children":[]},{"title":"Pre-Trade Checklist","slug":"pre-trade-checklist","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Trading"],"summary":"Trade","description":"Submit a new market order or limit order for execution.","operationId":"placeTrade","requestBody":"8631cf84-8402-40c1-9587-95c2559e6af3","responses":{"200":"b76d8648-2564-4017-b1c5-e682600fe110"},"method":"post","type":"path","servers":["d3c6989e-8848-43a1-89cb-3de2bb5e2350"],"security":["ac4683f8-e84c-43b5-8bc8-fe95a46d9f9a"],"path":"/markets/trade","baseUrlOptions":["https://www.aionmarket.com/bvapi"],"title":"Trade","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["marketConditionId","marketQuestion","outcome","orderSize","price","order"],"properties":{"marketConditionId":{"type":"string","description":"Market conditionId (persisted to mk_order)","example":"0xf64f880b571d7a70d858649d30f0843aa57307e304aeb617349df74ce34d044e","isRequired":true,"uniqueKey":"marketConditionId","typeLabel":"string"},"marketQuestion":{"type":"string","description":"Market question (persisted to mk_order)","example":"Will Crude Oil (CL) hit (HIGH) $120 by end of March?","maxLength":250,"isRequired":true,"uniqueKey":"marketQuestion","typeLabel":"string"},"outcome":{"type":"string","description":"Outcome direction","enum":["YES","NO"],"isRequired":true,"uniqueKey":"outcome","typeLabel":"enum\u003cstring>"},"orderSize":{"type":"number","description":"Order size (contracts), persisted to mk_order.orderSize","example":1,"isRequired":true,"uniqueKey":"orderSize","typeLabel":"number"},"price":{"type":"number","description":"Order price per contract, persisted to mk_order.price","example":0.54,"isRequired":true,"uniqueKey":"price","typeLabel":"number"},"order":{"type":"object","required":["maker","signer","tokenId","makerAmount","takerAmount","side","signature","salt","signatureType"],"properties":{"maker":{"type":"string","description":"Maker wallet address","example":"0x1111111111111111111111111111111111111111","isRequired":true,"uniqueKey":"order.maker","typeLabel":"string"},"signer":{"type":"string","description":"Signing wallet address","example":"0x1111111111111111111111111111111111111111","isRequired":true,"uniqueKey":"order.signer","typeLabel":"string"},"tokenId":{"type":"string","description":"CLOB token ID","example":"69136365945621600854789649488423522395843457249417452310260493085275775221076","isRequired":true,"uniqueKey":"order.tokenId","typeLabel":"string"},"makerAmount":{"type":"string","description":"Maker amount (6-decimal integer)","example":"120000","isRequired":true,"uniqueKey":"order.makerAmount","typeLabel":"string"},"takerAmount":{"type":"string","description":"Taker amount (6-decimal integer)","example":"1000000","isRequired":true,"uniqueKey":"order.takerAmount","typeLabel":"string"},"side":{"type":"string","enum":["BUY","SELL"],"description":"Trade direction","isRequired":true,"uniqueKey":"order.side","typeLabel":"enum\u003cstring>"},"signature":{"type":"string","description":"EIP712 signature","example":"0x1234abcd","isRequired":true,"uniqueKey":"order.signature","typeLabel":"string"},"salt":{"type":"number","description":"Random salt","example":599228746038,"isRequired":true,"uniqueKey":"order.salt","typeLabel":"number"},"signatureType":{"type":"integer","description":"0=EOA, 1=PolymarketProxy, 2=GnosisSafe, 3=DepositWallet (POLY_1271)","enum":[0,1,2,3],"isRequired":true,"uniqueKey":"order.signatureType","typeLabel":"enum\u003cinteger>"},"taker":{"type":"string","description":"Taker wallet address (zero address for open orders)","example":"0x0000000000000000000000000000000000000000","uniqueKey":"order.taker","typeLabel":"string"},"expiration":{"type":"string","description":"Expiration timestamp in seconds","example":"0","uniqueKey":"order.expiration","typeLabel":"string"},"nonce":{"type":"string","description":"Nonce (V1 only)","example":"0","uniqueKey":"order.nonce","typeLabel":"string"},"feeRateBps":{"type":"string","description":"Fee rate in basis points (V1 only)","example":"0","uniqueKey":"order.feeRateBps","typeLabel":"string"},"timestamp":{"type":"string","description":"V2 only: order timestamp in milliseconds","example":"1713000000000","uniqueKey":"order.timestamp","typeLabel":"string"},"metadata":{"type":"string","description":"V2 only: metadata (bytes32 hex)","example":"0x0000000000000000000000000000000000000000000000000000000000000000","uniqueKey":"order.metadata","typeLabel":"string"},"builder":{"type":"string","description":"V2 only: builder (bytes32 hex)","example":"0x0000000000000000000000000000000000000000000000000000000000000000","uniqueKey":"order.builder","typeLabel":"string"}},"isRequired":true,"uniqueKey":"order","typeLabel":"object"},"venue":{"type":"string","description":"Trading venue (default polymarket)","default":"polymarket","maxLength":50,"uniqueKey":"venue","typeLabel":"string"},"isLimitOrder":{"type":"boolean","description":"true=createOrder (limit); false=createMarketOrder (market)","default":true,"uniqueKey":"isLimitOrder","typeLabel":"boolean"},"orderType":{"type":"string","description":"Order type (default GTC for limit, FAK for market)","enum":["GTC","FOK","GTD","FAK"],"default":"GTC","uniqueKey":"orderType","typeLabel":"enum\u003cstring>"},"walletAddress":{"type":"string","description":"Wallet address (optional; falls back to order.signer)","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"walletAddress","typeLabel":"string"},"owner":{"type":"string","description":"Polymarket owner (optional, defaults to apiKey from credentials)","maxLength":128,"uniqueKey":"owner","typeLabel":"string"},"deferExec":{"type":"boolean","description":"Defer execution flag","default":false,"uniqueKey":"deferExec","typeLabel":"boolean"},"orderVersion":{"type":"integer","description":"Order version: 1=legacy V1, 2=Polymarket V2 (auto-inferred when omitted)","enum":[1,2],"uniqueKey":"orderVersion","typeLabel":"enum\u003cinteger>"},"tickSize":{"type":"string","description":"V2 tickSize hint","enum":["0.1","0.01","0.001","0.0001"],"uniqueKey":"tickSize","typeLabel":"enum\u003cstring>"},"negRisk":{"type":"boolean","description":"V2 negRisk flag","default":false,"uniqueKey":"negRisk","typeLabel":"boolean"},"funderAddress":{"type":"string","description":"V2 funder address (optional)","pattern":"^0x[a-fA-F0-9]{40}$","uniqueKey":"funderAddress","typeLabel":"string"},"postOnly":{"type":"boolean","description":"Post-only flag","default":false,"uniqueKey":"postOnly","typeLabel":"boolean"},"feeAmount":{"type":"number","description":"Market-order fee (only when isLimitOrder=false)","default":0,"uniqueKey":"feeAmount","typeLabel":"number"},"reasoning":{"type":"string","description":"Trade reasoning text (max 1000 chars)","maxLength":1000,"uniqueKey":"reasoning","typeLabel":"string"},"source":{"type":"string","description":"Source tag (suggested format sdk:strategy-name)","maxLength":100,"uniqueKey":"source","typeLabel":"string"},"skillSlug":{"type":"string","description":"Skill identifier for attribution","maxLength":100,"uniqueKey":"skillSlug","typeLabel":"string"},"expirationTime":{"type":"number","description":"Limit order expiration in milliseconds (mk_order.expirationTime)","default":0,"uniqueKey":"expirationTime","typeLabel":"number"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"marketConditionId":"0xf64f880b571d7a70d858649d30f0843aa57307e304aeb617349df74ce34d044e","marketQuestion":"Will Crude Oil (CL) hit (HIGH) $120 by end of March?","orderSize":1,"price":0.54,"order":{"maker":"0x1111111111111111111111111111111111111111","signer":"0x1111111111111111111111111111111111111111","tokenId":"69136365945621600854789649488423522395843457249417452310260493085275775221076","makerAmount":"120000","takerAmount":"1000000","signature":"0x1234abcd","salt":599228746038,"taker":"0x0000000000000000000000000000000000000000","expiration":"0","nonce":"0","feeRateBps":"0","timestamp":"1713000000000","metadata":"0x0000000000000000000000000000000000000000000000000000000000000000","builder":"0x0000000000000000000000000000000000000000000000000000000000000000"},"venue":"polymarket","isLimitOrder":true,"orderType":"GTC","walletAddress":"\u003cstring>","owner":"\u003cstring>","deferExec":false,"negRisk":false,"funderAddress":"\u003cstring>","postOnly":false,"feeAmount":0,"reasoning":"\u003cstring>","source":"\u003cstring>","skillSlug":"\u003cstring>","expirationTime":0}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"b76d8648-2564-4017-b1c5-e682600fe110":{"description":"Trade accepted","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","uniqueKey":"orderId","typeLabel":"string"},"status":{"type":"string","uniqueKey":"status","typeLabel":"string"},"submittedAt":{"type":"string","format":"date-time","uniqueKey":"submittedAt","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"orderId":"\u003cstring>","status":"\u003cstring>","submittedAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"ac4683f8-e84c-43b5-8bc8-fe95a46d9f9a":{"bearerAuth":{"type":"http","scheme":"bearer","x-default":"YOUR_API_KEY","scopes":[]}}},"servers":{"d3c6989e-8848-43a1-89cb-3de2bb5e2350":{"url":"https://www.aionmarket.com/bvapi","description":"Aion API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","x-default":"YOUR_API_KEY","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","default":"YOUR_API_KEY","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"aionmarket","siteName":"AI Agent API","title":"Trade - AI Agent API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-11T13:57:02.148Z","originalFileLocation":"api-reference/endpoint/place-trade.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Submit a new market order or limit order for execution.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AI Agent API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Trade - AI Agent API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Submit a new market order or limit order for execution.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AI Agent API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.aionmarket.com/api-reference/endpoint/place-trade\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://aionmarket.mintlify.app/_mintlify/api/og/v2?division=Trading\u0026amp;title=Trade\u0026amp;description=Submit+a+new+market+order+or+limit+order+for+execution.\u0026amp;theme=57a7c64df988be326083482a\u0026amp;signature=2395f6dd9c7367c476fe87d513a96ba521d22fd0984e3c164ed9836b49f54a23\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Trade - AI Agent API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Submit a new market order or limit order for execution.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://aionmarket.mintlify.app/_mintlify/api/og/v2?division=Trading\u0026amp;title=Trade\u0026amp;description=Submit+a+new+market+order+or+limit+order+for+execution.\u0026amp;theme=57a7c64df988be326083482a\u0026amp;signature=2395f6dd9c7367c476fe87d513a96ba521d22fd0984e3c164ed9836b49f54a23\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/aionmarket/7ebliMdokco7oz2F/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AI Agent API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1E40AF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.aionmarket.com/api-reference/endpoint/place-trade\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/place-trade.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.aionmarket.com/#organization\",\"name\":\"AI Agent API\",\"url\":\"https://docs.aionmarket.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/aionmarket/DvcBhshWShrT8_IW/logo/light.svg?fit=max\u0026auto=format\u0026n=DvcBhshWShrT8_IW\u0026q=85\u0026s=e05b9570e21b72c5833ff7ade71bbe39\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.aionmarket.com#website\",\"name\":\"AI Agent API\",\"url\":\"https://docs.aionmarket.com\",\"publisher\":{\"@id\":\"https://docs.aionmarket.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade#webpage\",\"url\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade\",\"name\":\"Trade\",\"description\":\"Submit a new market order or limit order for execution.\",\"dateModified\":\"2026-05-11T13:57:02.148Z\",\"isPartOf\":{\"@id\":\"https://docs.aionmarket.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI Agent API\",\"item\":\"https://docs.aionmarket.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Trade\",\"item\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade#apireference\",\"headline\":\"Trade\",\"name\":\"Trade\",\"description\":\"Submit a new market order or limit order for execution.\",\"url\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade\",\"mainEntityOfPage\":{\"@id\":\"https://docs.aionmarket.com/api-reference/endpoint/place-trade#webpage\"},\"dateModified\":\"2026-05-11T13:57:02.148Z\",\"publisher\":{\"@id\":\"https://docs.aionmarket.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.aionmarket.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AI Agent API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"AI Agent API","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/aionmarket"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API Overview","href":"/api-reference/introduction"}]},{"group":"Agent Management","pages":[{"title":"Register Agent","openapi":"POST /agents/register","href":"/api-reference/endpoint/agent-register"},{"title":"Get Agent Info","openapi":"GET /agents/me","href":"/api-reference/endpoint/agent-info"},{"title":"Get Agent By Claim Code","openapi":"GET /agents/claim/{claim_code}","href":"/api-reference/endpoint/get-agent-by-claim-code"}]},{"group":"Market Operations","pages":[{"title":"List Markets","openapi":"GET /markets","href":"/api-reference/endpoint/search-markets"},{"title":"Get Market","openapi":"GET /markets/{market_id}","href":"/api-reference/endpoint/get-market"},{"title":"Agent Briefing (Heartbeat)","openapi":"GET /markets/briefing","href":"/api-reference/endpoint/briefing"},{"title":"Get Prices History","openapi":"GET /markets/prices-history","href":"/api-reference/endpoint/prices-history"},{"title":"Get Market Context","openapi":"GET /markets/context/{id}","href":"/api-reference/endpoint/market-context"},{"title":"Get Current Positions","openapi":"GET /markets/current-positions","href":"/api-reference/endpoint/current-positions"},{"title":"Get Closed Positions","openapi":"GET /markets/closed-positions","href":"/api-reference/endpoint/closed-positions"}]},{"group":"Order Management","pages":[{"title":"Get Open Orders","openapi":"GET /markets/orders/open","href":"/api-reference/endpoint/open-orders"},{"title":"Get Order History","openapi":"GET /markets/orders","href":"/api-reference/endpoint/order-history"},{"title":"Get Order Detail","openapi":"GET /markets/orders/{id}","href":"/api-reference/endpoint/order-detail"},{"title":"Cancel Order","openapi":"POST /markets/orders/cancel","href":"/api-reference/endpoint/cancel-order"},{"title":"Cancel All Market Orders","openapi":"POST /markets/orders/cancel-market","href":"/api-reference/endpoint/cancel-all-orders"},{"title":"Cancel All User Orders","openapi":"DELETE /markets/orders","description":"Cancel all open orders across every active wallet for the authenticated user.","href":"/api-reference/endpoint/cancel-all-user-orders"}]},{"group":"Trading","pages":[{"title":"Trade","openapi":"POST /markets/trade","href":"/api-reference/endpoint/place-trade"},{"title":"Batch Trades","openapi":"POST /markets/batch-trade","description":"Submit multiple trade orders in a single request. Each order is executed sequentially with the same logic as POST /markets/trade. Maximum 20 orders per batch.","href":"/api-reference/endpoint/batch-trades"},{"title":"Redeem Settlement Rewards","openapi":"POST /markets/redeem","href":"/api-reference/endpoint/redeem"}]},{"group":"Skills","pages":[{"title":"Skills","openapi":"GET /agent/skill/skills","href":"/api-reference/endpoint/skills"},{"title":"Submit Skill","openapi":"POST /agent/skill/submit-skill","href":"/api-reference/endpoint/submit-skill"},{"title":"My Skills","openapi":"GET /agent/skill/my-skills","href":"/api-reference/endpoint/my-skills"}]},{"group":"Kalshi","pages":[{"title":"Kalshi Quote","openapi":"POST /kalshi/agent/quote","href":"/api-reference/endpoint/kalshi-quote"},{"title":"Kalshi Submit","openapi":"POST /kalshi/agent/submit","href":"/api-reference/endpoint/kalshi-submit"}]},{"group":"Fee Charging","pages":[{"title":"Charge Kalshi Fee","openapi":"POST /aiagent/charge-fee/kalshi/trade-fee","href":"/api-reference/endpoint/charge-kalshi-fee"}]},{"group":"Wallet","pages":[{"title":"Register Wallet Credentials","openapi":"POST /wallet/credentials","href":"/api-reference/endpoint/wallet-credentials"},{"title":"Check Wallet Credentials","openapi":"GET /wallet/credentials/check","href":"/api-reference/endpoint/check-wallet-credentials"},{"title":"Wallet Link Challenge","openapi":"GET /wallet/link/challenge","href":"/api-reference/endpoint/wallet-link-challenge"},{"title":"Wallet Link","openapi":"POST /wallet/link","href":"/api-reference/endpoint/wallet-link"},{"title":"update agent solAddress","openapi":"POST /wallet/update-sol-address","href":"/api-reference/endpoint/update-agent-sol-address"},{"title":"Wallet Unlink","openapi":"POST /wallet/unlink","href":"/api-reference/endpoint/wallet-unlink"},{"title":"Wallet Positions","openapi":"GET /markets/wallet/{walletAddress}/positions","href":"/api-reference/endpoint/wallet-positions"}]},{"group":"Risk Management","pages":[{"title":"Risk Settings Set","openapi":"POST /markets/risk-settings","href":"/api-reference/endpoint/risk-settings-set"},{"title":"Risk Settings List","openapi":"GET /markets/risk-settings","href":"/api-reference/endpoint/risk-settings-list"},{"title":"Risk Settings Delete","openapi":"DELETE /markets/risk-settings","href":"/api-reference/endpoint/risk-settings-delete"}]},{"group":"Trades \u0026 Leaderboard","pages":[{"title":"Get Trades","openapi":"GET /agents/trades","href":"/api-reference/endpoint/get-trades"},{"title":"Get Sdk Agent Leaderboard","openapi":"GET /agents/leaderboard","href":"/api-reference/endpoint/get-leaderboard"}]},{"group":"Positions \u0026 Portfolio","pages":[{"title":"Positions Expiring","openapi":"GET /markets/positions/expiring","href":"/api-reference/endpoint/positions-expiring"},{"title":"Portfolio","openapi":"GET /markets/portfolio","href":"/api-reference/endpoint/portfolio"}]},{"group":"Utilities","pages":[{"title":"Health","openapi":"GET /agents/health","href":"/api-reference/endpoint/health"}]},{"group":"Settings","pages":[{"title":"Get Settings","openapi":"GET /agents/settings","href":"/api-reference/endpoint/get-settings"},{"title":"Update Settings","openapi":"POST /agents/settings","href":"/api-reference/endpoint/update-settings"}]}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/essentials/python-sdk"}]}]},"title":"Trade - AI Agent API","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BRm_l__d.js","utils-f1l1Oc-G.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BlhqDhJO.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DHCB7rsC.js","snippetPresets-CYXLx6Hv.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-B78P2dEq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C4YLPVAh.js","shallow-vlLnTDkQ.js","getApiPlaygroundDisplay-D_98hhvf.js","CodeSnippet-DtnZHGqq.js","CodeSnippets-CLFb8KJt.js","Page-kQh739Uz.js","getPastedJson-Cq-zlbnU.js","icon-sN3t983t.js","MethodPill-P_YQ2s09.js","DuplicateIcon-BVzyNsGJ.js","createIcon-B3jqgqC6.js","DynamicMarkdown-Crwq6WG_.js","SectionHeading-C7pGS2Bb.js","axios-vUo_bRtp.js","Markdown-BuPH8yuW.js","clsx-CCOYKgaU.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BnkC_6oA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BM4S31-f.js"]}