Mythical Platform
Mythical Platform
  • The Mythical Platform API
  • Quick start
    • Authenticate
    • Create a guest player
    • Create an item type
    • Grant an item to a player
    • Update item metadata
    • Use webhooks for real time messages
    • Buy a listed item
  • API Reference
    • Players
    • Item Types
    • Items
    • Marketplace
      • Listings
      • Offers
      • Quick trade
      • Transaction history
      • Exchange rate
    • Webhook management
    • System
Powered by GitBook
On this page
  1. API Reference
  2. Marketplace

Offers

PreviousListingsNextQuick trade

Last updated 3 days ago

Check sell status

get

Check the status of a given sell 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
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
get
GET /v1/offers/accept/{operationId}/status HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
  "status": "Running"
}
  • POSTGet offers on a players items
  • POSTAccept an offer
  • GETCheck sell status

Get offers on a players items

post

For each provided item belonging to the player, will return the best offer which has been placed in the Mythical Marketplace.

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

Identifier for the environment that this request should interact with

Body
itemsstring[]Optional

A list of items from the players inventory for which to retrieve the best offers on (max limit 100).

playerIdstringRequired

id of the player to find offers for

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200
Success
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /v1/players/items/appraise HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "items": [
    "text"
  ],
  "playerId": "123e4567-e89b-12d3-a456-426614174000"
}
{
  "MYTHtoUSD": {
    "expiresAt": 1738728868,
    "rate": "0.33",
    "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImJhc2UiOiJNWVRIIiwicmF0ZXMiOnsiVVNEIjoxLjU2fX0.WLo4h7JoJcJyXJZceOBlr84DJ_k1cGWBJhqbzKcPbcWHzMgrXcsnEFNr_hrDKUVeI-x_qQn1XfcUSLsWh1qDZg"
  },
  "items": [
    {
      "id": "text",
      "offer": {
        "accept": {
          "expiresAt": 1738728868,
          "fee": {
            "amount": {
              "myth": "4.2",
              "usd": "42.5"
            }
          },
          "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImxpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMCIsInVpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMSIsImZlZSI6MC40Mn0.Vi7A31IZbNhoW72d5oimpTU1M7puaFV4AkdP-ljCKBclk8ntvOR60bV7KifsLQOW1VZqpxMzqEiB7w6mi59gLg"
        },
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "price": {
          "myth": "4.2",
          "usd": "42.5"
        },
        "trade": {
          "expiresAt": 1738728868,
          "fee": {
            "amount": {
              "myth": "4.2",
              "usd": "42.5"
            }
          },
          "token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImxpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMCIsInVpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMSIsImZlZSI6MC40Mn0.Vi7A31IZbNhoW72d5oimpTU1M7puaFV4AkdP-ljCKBclk8ntvOR60bV7KifsLQOW1VZqpxMzqEiB7w6mi59gLg"
        },
        "version": 5
      },
      "version": 1
    }
  ]
}

Accept an offer

post

Accept the specified offer from the Mythical Marketplace on behalf of the given player. Will only succeed if the provided mythToUsd rate has not deviated too far from when the price was quoted, and the version of the offer has not changed.

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

Identifier for the environment that this request should interact with

Body
exchangeRateTokenstringRequired

A token that identifies and confirms the authenticity of the exchange rate at which the terms of the sell were displayed.

Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImJhc2UiOiJNWVRIIiwicmF0ZXMiOnsiVVNEIjoxLjU2fX0.WLo4h7JoJcJyXJZceOBlr84DJ_k1cGWBJhqbzKcPbcWHzMgrXcsnEFNr_hrDKUVeI-x_qQn1XfcUSLsWh1qDZg
acceptTokenstringRequired

A token that identifies and confirms the authenticity of the purchase terms.

Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImxpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMCIsInVpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMSIsImZlZSI6MC40Mn0.Vi7A31IZbNhoW72d5oimpTU1M7puaFV4AkdP-ljCKBclk8ntvOR60bV7KifsLQOW1VZqpxMzqEiB7w6mi59gLg
itemIdstringRequired

UUID of the item to sell.

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

UUID of the offer to accept.

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

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

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

User on whose behalf the offer is being accepted.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
200
Success
application/json
Responseobject
400
Bad Request
application/json
401
Unauthorized
application/json
404
Not Found
application/json
500
Internal Server Error
application/json
post
POST /v1/offers/accept HTTP/1.1
Host: 
Authorization: Bearer JWT
x-mythical-environment-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 725

{
  "exchangeRateToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImJhc2UiOiJNWVRIIiwicmF0ZXMiOnsiVVNEIjoxLjU2fX0.WLo4h7JoJcJyXJZceOBlr84DJ_k1cGWBJhqbzKcPbcWHzMgrXcsnEFNr_hrDKUVeI-x_qQn1XfcUSLsWh1qDZg",
  "acceptToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3Mzg3Mjg4NjgsImxpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMCIsInVpZCI6IjEyM2U0NTY3LWU4OWItMTJkMy1hNDU2LTQyNjYxNDE3NDAwMSIsImZlZSI6MC40Mn0.Vi7A31IZbNhoW72d5oimpTU1M7puaFV4AkdP-ljCKBclk8ntvOR60bV7KifsLQOW1VZqpxMzqEiB7w6mi59gLg",
  "itemId": "123e4567-e89b-12d3-a456-426614174000",
  "offerId": "123e4567-e89b-12d3-a456-426614174000",
  "operationId": "123e4567-e89b-12d3-a456-426614174000",
  "sellerPlayerId": "123e4567-e89b-12d3-a456-426614174000"
}
{}