Tidepooltestnet

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

FieldTypeRequiredDescription
dataobjectyes
data.type"orders"yes
data.attributesLimitOrderCreateRequestyes
data.attributes.orderTypeobjectyesOrder type.
data.attributes.baseAssetstringyesID of the base asset in the trading pair.
data.attributes.quoteAssetstringyesID of the quote asset used to price the base asset.
data.attributes.quantitystringyesBase-asset order quantity in the asset smallest unit. A BUY targets this output; a SELL targets this input.
data.attributes.sideobjectyesOrder side. SELL spends the base asset; BUY spends the quote asset.
data.attributes.pricestringyesPositive human-unit limit price expressed as quote asset units per one base asset
data.attributes.depositTypeobjectyesORIGIN_CHAIN returns a chain address; INTENTS and CONFIDENTIAL_INTENTS use the generate-intent and submit-intent flow.
data.attributes.refundTostringyesAddress used for refunds.
data.attributes.refundTypeobjectyesType of refund address.
data.attributes.recipientstringyesAddress or Intents account that receives successfully filled output.
data.attributes.recipientTypeobjectyesType of recipient address.
data.attributes.deadlinestringTimestamp in ISO format that identifies when the order can expire.
data.attributes.depositModeobjectDeposit address mode.
data.attributes.confidentialityobjectyesConfidentiality mode. Required for orders.
data.attributes.timeInForceobjectTime in force for the order.
data.attributes.appFeesAppFee[]Application fees included in the submitted limit price and deducted from input.
data.attributes.appFees[].[]recipientstringyesAccount ID within Intents to which this fee will be transferred
data.attributes.appFees[].[]feenumberyesFee 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"
  }
}

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.

On this page