Create an order
POST /v0/orders · 1Click-compatible
POST/v0/orders
Needs Authorization: Bearer <accessToken> (or any X-API-Key). Tidepool fills a limit order once, with no partial fills; deadline 7 days by default and 30 days at most. The request sets every attribute; real response (a SELL of 1 wNEAR at 3.5 USDC, deposit not yet made, so AWAITING_DEPOSIT).
Creates a confidential order. Errors. Branch on code, never on title or detail. New codes arrive without a major version, so treat an unrecognized code as the HTTP status alone. | Status | Codes | | --- | --- | | 400 | malformed-request, validation-failed, request-rejected, order-rejected | | 401 | authentication-required | | 403 | client-generated-id | | 409 | resource-type-mismatch | | 429 | rate-limit-exceeded | | 500 | internal-error | | 503 | service-unavailable | Tidepool: needs a Tidepool JWT or any X-API-Key. The Tidepool maker fills the whole order once (no partial fills). SELL fills at the limit price. confidentiality is ignored. The deadline defaults to 7 days, max 30.
Operation id: createOrder · Auth: optional (X-API-Key or Authorization: Bearer, any value)
Request
curl -X POST "https://www.usetidepool.tech/v0/orders" \
-H 'Authorization: Bearer <accessToken>' \
-H 'content-type: application/json' \
-d '{
"data": {
"type": "orders",
"attributes": {
"orderType": "LIMIT",
"baseAsset": "nep141:wnear.tidepool-sandbox.testnet",
"quoteAsset": "nep141:usdc.tidepool-sandbox.testnet",
"quantity": "1000000000000000000000000",
"side": "SELL",
"price": "3.5",
"depositType": "INTENTS",
"refundTo": "9cf39ad040a13205c3ab109a8566fd779394a548f76b1aed5107efcdfe6c7ceb",
"refundType": "INTENTS",
"recipient": "9cf39ad040a13205c3ab109a8566fd779394a548f76b1aed5107efcdfe6c7ceb",
"recipientType": "INTENTS",
"deadline": "2026-11-20T00:00:00.000Z",
"depositMode": "SIMPLE",
"confidentiality": "public",
"timeInForce": "GTC",
"appFees": [
{
"recipient": "fees.testnet",
"fee": 100
}
]
}
}
}'Body
| Field | Type | Required | Description |
|---|---|---|---|
data | object | yes | |
data.type | "orders" | yes | |
data.attributes | LimitOrderCreateRequest | yes | |
data.attributes.orderType | object | yes | Order type. |
data.attributes.baseAsset | string | yes | ID of the base asset in the trading pair. |
data.attributes.quoteAsset | string | yes | ID of the quote asset used to price the base asset. |
data.attributes.quantity | string | yes | Base-asset order quantity in the asset smallest unit. A BUY targets this output; a SELL targets this input. |
data.attributes.side | object | yes | Order side. SELL spends the base asset; BUY spends the quote asset. |
data.attributes.price | string | yes | Positive human-unit limit price expressed as quote asset units per one base asset |
data.attributes.depositType | object | yes | ORIGIN_CHAIN returns a chain address; INTENTS and CONFIDENTIAL_INTENTS use the generate-intent and submit-intent flow. |
data.attributes.refundTo | string | yes | Address used for refunds. |
data.attributes.refundType | object | yes | Type of refund address. |
data.attributes.recipient | string | yes | Address or Intents account that receives successfully filled output. |
data.attributes.recipientType | object | yes | Type of recipient address. |
data.attributes.deadline | string | Timestamp in ISO format that identifies when the order can expire. | |
data.attributes.depositMode | object | Deposit address mode. | |
data.attributes.confidentiality | object | yes | Confidentiality mode. Required for orders. |
data.attributes.timeInForce | object | Time in force for the order. | |
data.attributes.appFees | AppFee[] | Application fees included in the submitted limit price and deducted from input. | |
data.attributes.appFees[].[]recipient | string | yes | Account ID within Intents to which this fee will be transferred |
data.attributes.appFees[].[]fee | number | yes | Fee for this recipient as part of amountIn in basis points (1/100th of a percent), e.g. 100 for 1% fee |
Responses
201 Order created.
{
"data": {
"type": "orders",
"id": "ord_30bcf13f028ef83ae6dd9a64",
"attributes": {
"orderType": "LIMIT",
"depositAddress": "b3e013f41cee40b33296f5e0185feae34c2f95059a05482e07cb610acd067322",
"depositMode": "SIMPLE",
"depositType": "INTENTS",
"fillStatus": "AWAITING_DEPOSIT",
"payoutStatus": "NOT_STARTED",
"isPayoutStatusFinal": false,
"payouts": {
"withdrawal": null,
"allWithdrawals": [],
"refund": null
},
"depositedAmount": "0",
"depositedAmountFormatted": "0",
"baseAsset": "nep141:wnear.tidepool-sandbox.testnet",
"quoteAsset": "nep141:usdc.tidepool-sandbox.testnet",
"quantity": "1000000000000000000000000",
"swapView": {
"swapType": "EXACT_INPUT",
"originAsset": "nep141:wnear.tidepool-sandbox.testnet",
"destinationAsset": "nep141:usdc.tidepool-sandbox.testnet",
"amountIn": "1000000000000000000000000",
"minAmountOut": "3465000"
},
"side": "SELL",
"price": "3.5",
"appFees": [
{
"recipient": "fees.testnet",
"fee": 100
}
],
"recipient": "9cf39ad040a13205c3ab109a8566fd779394a548f76b1aed5107efcdfe6c7ceb",
"recipientType": "INTENTS",
"refundTo": "9cf39ad040a13205c3ab109a8566fd779394a548f76b1aed5107efcdfe6c7ceb",
"refundType": "INTENTS",
"estimatedWithdrawFee": "0",
"estimatedWithdrawFeeFormatted": "0",
"estimatedRefundFee": "0",
"estimatedRefundFeeFormatted": "0",
"confidentiality": "public",
"timeInForce": "GTC",
"deadline": "2026-11-20T00:00:00.000Z",
"createdAt": "2026-10-30T16:31:25.898Z",
"partialFills": []
},
"links": {
"self": "/v0/orders/ord_30bcf13f028ef83ae6dd9a64"
}
},
"meta": {
"correlationId": "2e49fb95-1711-423e-b91e-d59f45f7a758",
"timestamp": "2026-10-30T16:31:25.898Z"
}
}| Field | Type | Required | Description |
|---|---|---|---|
data | object | yes | |
data.type | "orders" | yes | |
data.id | string | yes | Opaque resource identifier. Clients should treat IDs as opaque and not rely on the prefix or length. |
data.attributes | LimitOrderAttributes | yes | |
data.attributes.orderType | object | yes | Order type. |
data.attributes.depositAddress | string | yes | Deposit address for funding the order. |
data.attributes.depositMemo | string | Memo to include with the deposit, when required. | |
data.attributes.depositMode | object | yes | Deposit address mode. |
data.attributes.depositType | object | yes | Type of deposit address. |
data.attributes.fillStatus | object | yes | Current fill status. This does not show whether payout funds arrived. |
data.attributes.payoutStatus | object | yes | Aggregated progress of the main withdrawal and refund. |
data.attributes.isPayoutStatusFinal | boolean | yes | Whether payoutStatus is COMPLETED or FAILED. This field is derived and has no additional meaning. |
data.attributes.payouts | object | yes | Current withdrawal and refund legs. |
data.attributes.payouts.withdrawal | OrderPayoutInProgress \ | OrderPayoutCompleted \ | PayoutFailed |
Variant 1 of 3: OrderPayoutInProgress | |||
data.attributes.payouts.withdrawal.status | "IN_PROGRESS" | yes | |
Variant 2 of 3: OrderPayoutCompleted | |||
data.attributes.payouts.withdrawal.status | "COMPLETED" | yes | |
data.attributes.payouts.withdrawal.txHash | string | yes | Destination-chain transaction hash. |
Variant 3 of 3: PayoutFailed | |||
data.attributes.payouts.withdrawal.status | "FAILED" | yes | |
data.attributes.payouts.withdrawal.reason | string | Terminal failure reason. This payout leg is not retried. Not populated yet - reserved for a defined set of public reasons. | |
data.attributes.payouts.allWithdrawals | OrderPayoutInProgress \ | OrderPayoutCompleted \ | PayoutFailed[] |
Variant 1 of 3: OrderPayoutInProgress | |||
data.attributes.payouts.allWithdrawals[].[]status | "IN_PROGRESS" | yes | |
Variant 2 of 3: OrderPayoutCompleted | |||
data.attributes.payouts.allWithdrawals[].[]status | "COMPLETED" | yes | |
data.attributes.payouts.allWithdrawals[].[]txHash | string | yes | Destination-chain transaction hash. |
Variant 3 of 3: PayoutFailed | |||
data.attributes.payouts.allWithdrawals[].[]status | "FAILED" | yes | |
data.attributes.payouts.allWithdrawals[].[]reason | string | Terminal failure reason. This payout leg is not retried. Not populated yet - reserved for a defined set of public reasons. | |
data.attributes.payouts.refund | OrderPayoutInProgress \ | OrderPayoutCompleted \ | PayoutFailed |
Variant 1 of 3: OrderPayoutInProgress | |||
data.attributes.payouts.refund.status | "IN_PROGRESS" | yes | |
Variant 2 of 3: OrderPayoutCompleted | |||
data.attributes.payouts.refund.status | "COMPLETED" | yes | |
data.attributes.payouts.refund.txHash | string | yes | Destination-chain transaction hash. |
Variant 3 of 3: PayoutFailed | |||
data.attributes.payouts.refund.status | "FAILED" | yes | |
data.attributes.payouts.refund.reason | string | Terminal failure reason. This payout leg is not retried. Not populated yet - reserved for a defined set of public reasons. | |
data.attributes.depositedAmount | string | yes | Cumulative deposited input amount in the smallest unit of the base asset for SELL or the quote asset for BUY. |
data.attributes.depositedAmountFormatted | string | yes | Cumulative deposited input amount formatted using the input asset decimals. |
data.attributes.baseAsset | string | yes | ID of the base asset in the trading pair. |
data.attributes.quoteAsset | string | yes | ID of the quote asset used to price the base asset. |
data.attributes.quantity | string | yes | Base-asset order quantity in the asset smallest unit. A BUY targets this output; a SELL targets this input. |
data.attributes.swapView | LimitOrderExactInputSwapView \ | LimitOrderExactOutputSwapView | yes |
Variant 1 of 2: LimitOrderExactInputSwapView | |||
data.attributes.swapView.swapType | "EXACT_INPUT" | yes | |
data.attributes.swapView.originAsset | string | yes | |
data.attributes.swapView.destinationAsset | string | yes | |
data.attributes.swapView.amountIn | string | yes | |
data.attributes.swapView.minAmountOut | string | yes | |
Variant 2 of 2: LimitOrderExactOutputSwapView | |||
data.attributes.swapView.swapType | "EXACT_OUTPUT" | yes | |
data.attributes.swapView.originAsset | string | yes | |
data.attributes.swapView.destinationAsset | string | yes | |
data.attributes.swapView.maxAmountIn | string | yes | |
data.attributes.swapView.amountOut | string | yes | |
data.attributes.side | object | yes | Submitted order side. |
data.attributes.price | string | yes | Submitted human-unit limit price. |
data.attributes.appFees | AppFee[] | yes | Normalized application and protocol fees. |
data.attributes.appFees[].[]recipient | string | yes | Account ID within Intents to which this fee will be transferred |
data.attributes.appFees[].[]fee | number | yes | Fee for this recipient as part of amountIn in basis points (1/100th of a percent), e.g. 100 for 1% fee |
data.attributes.recipient | string | yes | Recipient address supplied when creating the order. |
data.attributes.recipientType | object | yes | Type of recipient address. |
data.attributes.refundTo | string | yes | Refund address supplied when creating the order. |
data.attributes.refundType | object | yes | Type of refund address. |
data.attributes.estimatedWithdrawFee | string | yes | Withdrawal-fee estimate captured at creation, in destination-asset smallest units. It covers one withdrawal. The fee charged for each withdrawal may differ. |
data.attributes.estimatedWithdrawFeeFormatted | string | yes | Withdrawal-fee estimate formatted using the destination asset decimals. |
data.attributes.estimatedRefundFee | string | yes | Refund-fee estimate captured at creation, in input-asset smallest units. The fee charged for the refund may differ. |
data.attributes.estimatedRefundFeeFormatted | string | yes | Refund-fee estimate formatted using the input asset decimals. |
data.attributes.confidentiality | object | yes | Confidentiality mode for this order. |
data.attributes.timeInForce | object | yes | Time in force for the order. |
data.attributes.deadline | string | yes | Timestamp in ISO format that identifies when the order can expire. |
data.attributes.createdAt | string | yes | Timestamp in ISO format that identifies when the order was created. |
data.attributes.partialFills | LimitOrderPartialFill[] | Successful fills. Fills that are in flight or failed are not reported. | |
data.attributes.partialFills[].[]id | string | yes | Public identifier for this fill attempt. |
data.attributes.partialFills[].[]amountIn | string | yes | Gross input allocated to the fill, in input-asset smallest units. |
data.attributes.partialFills[].[]amountOut | string | yes | Net output received for the fill, in output-asset smallest units. |
data.attributes.partialFills[].[]createdAt | string | yes | ISO 8601 creation timestamp. |
data.attributes.partialFills[].[]updatedAt | string | yes | ISO 8601 last-update timestamp. |
data.links | object | yes | |
data.links.self | string | yes | |
meta | JsonApiMeta | yes | |
meta.correlationId | string | yes | Unique identifier for request tracing and debugging. |
meta.timestamp | string | yes | Timestamp in ISO format when the response was generated. |
400 Malformed request, Validation failed, Request rejected, Order rejected
{
"errors": [
{
"status": "400",
"code": "validation-failed",
"title": "Validation failed",
"detail": "side must be SELL or BUY",
"source": {
"pointer": "/data/attributes/side"
}
}
],
"meta": {
"correlationId": "4afa5228-ba9e-419b-a276-66e7b34e149b",
"timestamp": "2026-10-30T16:32:43.258Z"
}
}Rejected order (deadline over 30 days)
{
"errors": [
{
"status": "400",
"code": "order-rejected",
"title": "Order rejected",
"detail": "deadline must be within 720 hours"
}
],
"meta": {
"correlationId": "418911b6-3710-4210-bdfe-a0e39592bc8d",
"timestamp": "2026-10-30T16:31:22.257Z"
}
}Malformed body
{
"errors": [
{
"status": "400",
"code": "malformed-request",
"title": "Malformed request",
"detail": "body must be {data:{type:\"orders\",attributes}}"
}
],
"meta": {
"correlationId": "b3c698bb-9e05-4243-93c8-87ed5cb1a221",
"timestamp": "2026-10-30T16:32:43.697Z"
}
}401 Authentication required
{
"errors": [
{
"status": "401",
"code": "authentication-required",
"title": "Authentication required",
"detail": "Send Authorization: Bearer <accessToken> (from /v0/auth/authenticate) or x-api-key"
}
],
"meta": {
"correlationId": "fea594fc-2409-45eb-aa08-72421258265a",
"timestamp": "2026-10-30T16:31:33.908Z"
}
}403 Client generated id
{
"errors": [
{
"status": "403",
"code": "client-generated-id",
"title": "Client generated id",
"detail": "Client-generated ids are not supported"
}
],
"meta": {
"correlationId": "b687284d-2922-406d-9e7b-1d5a30cdd34a",
"timestamp": "2026-10-30T16:32:42.298Z"
}
}409 Resource type mismatch
{
"errors": [
{
"status": "409",
"code": "resource-type-mismatch",
"title": "Resource type mismatch",
"detail": "data.type must be \"orders\"",
"source": {
"pointer": "/data/type"
}
}
],
"meta": {
"correlationId": "acb83e42-b3db-4f4b-902e-9a87bdb99643",
"timestamp": "2026-10-30T16:32:42.810Z"
}
}429 Rate limit exceeded
JSON:API error document (same shape as the other errors) when a client is rate limited. Not returned in testing.
500 Internal error
JSON:API error document, code: "internal-error". Not returned in testing.
503 Service unavailable
JSON:API error document. Not returned in testing.
Community-built · not affiliated with NEAR. Tidepool is community-built and not affiliated with NEAR, Defuse or 1Click. Testnet only; test tokens have no value. Built by @realchriswilder.