Quick trade

Create a quick trade

post

Creates a quick trade transaction based on the specified listings and offers, confirming that the quick trade can be executed. When the quick trade is created, the listings and offers are reserved for some time. The items are released when the quick trade is cancelled, executed, or expires.

Authorizations
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Body
exchangeRateTokenstringRequiredDeprecated

A token that identifies and confirms the authenticity of the exchange rate.

Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImJhc2UiOiJNWVRIIiwicmF0ZXMiOnsiVVNEIjoxLjU2fX0.WLo4h7JoJcJyXJZceOBlr84DJ_k1cGWBJhqbzKcPbcWHzMgrXcsnEFNr_hrDKUVeI-x_qQn1XfcUSLsWh1qDZg
operationIdstringRequired

A unique identifier for the idempotent execution and tracing the request.

Example: 123e4567-e89b-12d3-a456-426614174000
traderIdstringRequired

User on whose behalf the trade is being executed.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200
Success
application/json
Responseobject
post
POST /v1/quick-trade HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 275

{
  "give": [
    {
      "exchangeRateToken": "text",
      "itemId": "text",
      "offerId": "text",
      "tradeToken": "text"
    }
  ],
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "receive": [
    {
      "exchangeRateToken": "text",
      "listingId": "text",
      "tradeToken": "text"
    }
  ],
  "traderId": "123e4567-e89b-12d3-a456-426614174000"
}
{}

Cancel a quick trade

post

Cancelling a quick trade releases the offers and listings involved so that other users on the marketplace can interact with them. If a user prematurely leaves the quick trade flow, the quick trade should be cancelled.

Authorizations
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Body
operationIdstringRequired

A unique identifier for the idempotent execution and tracing the request.

Example: 123e4567-e89b-12d3-a456-426614174000
traderIdstringRequired

User on whose behalf the trade is being executed.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200
Success
application/json
Responseobject
post
POST /v1/quick-trade/cancel HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "traderId": "123e4567-e89b-12d3-a456-426614174000"
}
{}

Execute a quick trade

post

The offers and listings in the quick trade will be accepted and purchases on behalf of the user. The user will be charged/credited according to whether the quick trade creates a currency deficit/surplus.

Authorizations
Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Body
operationIdstringRequired

A unique identifier for the idempotent execution and tracing the request.

Example: 123e4567-e89b-12d3-a456-426614174000
traderIdstringRequired

User on whose behalf the trade is being executed.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200
Success
application/json
Responseobject
post
POST /v1/quick-trade/execute HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "traderId": "123e4567-e89b-12d3-a456-426614174000"
}
{}

Check quick trade

get

Check the status of a given quick trade operation.

Authorizations
Path parameters
operationIdstringRequired

A unique identifier for the idempotent execution and tracing the request (UUID)

Header parameters
x-mythical-environment-idstring · uuidRequired

Identifier for the environment that this request should interact with

Responses
200
Success
application/json
get
GET /v1/quick-trade/{operationId}/status HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
  "status": "Running"
}

Last updated