Prepare an order for signing
Step 1 of 3. Validates the order, builds the Canton transaction and has it prepared against the ledger. NOTHING IS ON THE BOOK when this returns. Next: sign data.signing.preparedTransactionHash and POST the signature to data.signing.submitUrl (see the Submit tag). The prepared transaction has a 5 minute TTL. Prepare only what the client intends to sign immediately. Typical latency 10 to 13 seconds against a 30 second server ceiling. SERIALISE PER PARTY. Preparing a second order while a previous one is still awaiting ledger confirmation can be rejected with LEDGER_COMMAND_REJECTED ("Calden is still waiting for ledger confirmation"). Reproduced under network degradation; no safe concurrency limit has been established under healthy conditions. Submit, confirm via GET /orders, then prepare the next.
/ordersAuthorization: Bearer mm_ak_.. The part before the dot is a public handle, safe to log. The part after is the secret.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/orders" \ -H "Content-Type: application/json" \ -d '{ "pair": "CBTC/CC", "side": "BUY", "type": "LIMIT", "quantity": "0.01" }'{ "ok": true, "data": { "order": { "clientOrderId": "string", "pair": "string", "side": "BUY", "type": "string", "price": "string", "quantity": "string", "filledQuantity": "string", "status": "string", "contractId": "string", "createdAt": "2019-08-24T14:15:22Z", "correlationId": "string", "caldenIntentId": "string", "providerFeeAmount": "0", "providerFeeSymbol": "CC" }, "signing": { "requiresSignature": true, "preparedTransactionHash": "string", "hashingSchemeVersion": "HASHING_SCHEME_VERSION_V2", "submitUrl": "http://example.com", "submitToken": "string", "commandId": "string", "status": "PENDING_SIGNATURE", "signingUrl": "string", "prepared": {} } }}Need help
Write to support@wolfedgelabs.com and include your party ID.