---
title: "POST /v1/legend-twaps"
method: POST
path: "/v1/legend-twaps"
tags: ["legend-twaps"]
---

# POST /v1/legend-twaps

`POST /v1/legend-twaps`

## Request

- Base URL: `https://app.legend.trade/api/rest`
- URL: `https://app.legend.trade/api/rest/v1/legend-twaps`
- Auth: HTTP bearer

## Request body

- object
  - `provider` 'native' | 'legend'
  - `id` string, uuid, required
  - `expiresAfter` integer, required
  - `address` string, required
  - `asset` integer, required
  - `buy` boolean, required
  - `size` string, required
  - `reduceOnly` boolean, required
  - `minutes` integer, required
  - `randomize` boolean, required
  - `trigger` object
    - `price` string, required
    - `above` boolean, required
  - `stopPrice` string

## Response `200`

Successful response

- LegendTwapCreated
  - `twapId` integer, required
  - `provider` 'legend', required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `500`: Internal server error

## Changes

- **2026-10-15** `c3b07d60c348`: 1 breaking, 2 info
  - the `twapId` response property's min was decreased from `1000000000000.00` to `0.00` for the response status `200`
  - added the new optional request property `provider`
  - added the required property `provider` to the response with the `200` status
- **2026-10-08** `d341c13fd3d9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/legend/apis/legend-api/changes/v1/legend-twaps/post.md)

---

[API](https://skmtc.dev/legend/apis/legend-api.md) - [All operations](https://skmtc.dev/legend/apis/legend-api/llms.txt) - [OpenAPI document](https://skmtc.dev/legend/apis/legend-api/revisions/c3e45061cf81?raw)
