Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

getOrder

Read the details of a single active limit order by id.

Signature

function getOrder(
  client: Client,
  parameters: {
    orderId: OrderId
    height?: number
  },
): Promise<OrderResponse>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const order = await client.getOrder({ orderId: "12345" })

Parameters

orderIdOrderId. The order id.

heightnumber, optional. Block height. Default 0 (latest).

Returns

OrderResponse{ user, baseDenom, quoteDenom, direction, price, amount, remaining }.

See also