Skip to main content
The Orders service lets you place, monitor, and cancel trading orders on the Paxos exchange. Client accessor: client.Orders

Available Methods

MethodHTTP EquivalentDescription
ListOrdersGET /trading/ordersList orders with optional filters
CreateOrderPOST /trading/ordersPlace a new order
GetOrderGET /trading/orders/{id}Get an order by ID
CancelOrderDELETE /trading/orders/{id}Cancel a pending order
ListExecutionsGET /trading/executionsList order executions

CreateOrder

order, err := client.Orders.CreateOrder(ctx, &paxos.CreateOrderRequest{
    ProfileID: "profile_123",
    Market:    "BTC-USD",
    Side:      "BUY",
    Type:      "MARKET",
    BaseAmount: "0.01",
})
if err != nil {
    log.Fatal(err)
}
fmt.Printf("Order %s: %s\n", order.ID, order.Status)

CancelOrder

err := client.Orders.CancelOrder(ctx, "order_123")
For the full REST API documentation, see the Orders API Reference.