Skip to main content

Sell

The Sell API allows you to place a Sell order under a user's account.

Note, although Winter connects with multiple exchanges, we will fulfill your sell order at the best possible price, regardless of exchange. We abstract away needing to figure out which exchange is the best. Fees are the same regardless of which exchange we use to fulfill.

Note, only accountId's that are created under your organization will be accessible.

API details#

URL : /v1/sell

Method : POST

Auth required : Yes (API key and secret are required)

Body payload#

Sample body payload:

{  "accountId": "12345",  "order_type": "LIMIT",  "limit_order_max_price": 4010.00,  "crypto_ticker": "ETH",  "amount": 0.023}

- accountId - String. The accountId of the returned account

- order_type - Enum. Type of order. Options: LIMIT, MARKET

- limit_order_max_price - Double. REQUIRED if order_type is LIMIT. The maximum USD price to sell for the order. This price is the USD price for 1 complete coin, regardless of the amount in the order.

For example, if the user only wants to sell 0.5 ETH, the limit_order_max_price will be the max price to sell 1 ETH for

- crypto_ticker - String. The ticker of the crypto to sell. Check this page for the cryptos we support

- amount - Double. The amount of the crypto ticker to sell

- time_in_force - Enum, optional. How long the order should be open before expiring. By default, the time_in_force will be 60_DAYS. Options: 24_HOURS, 60_DAYS

Success Response#

Code : 200 OK

Sample response return:

{  "orderId": "12345",  "order_status": "OPEN"}

- orderId - String. The unique identifier for the trade

- order_status - Enum. Enum that represents the trade status. Enum options: FULFILLED, OPEN, USER_CANCELLED, EXPIRED, SYSTEM_CANCELLED

Error Response#

Code : 400 BAD REQUEST

Condition : If accountId is invalid or if organization does not have access to this account.

Code : 409 NOT ENOUGH ACCOUNT FUNDS

Condition : If accountId is invalid or if organization does not have access to this account.