Marketplace

Marketplace APIs that is used for selling/buying tokens.

* is a required field

Buy Offer

Add buy offer

You can create a buy offer for the specific token. Users can sell the token to developer and get Vessel coins. This is used for setting a hard floor price for the token in the marketplace.

post
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
Body
buyerstringRequired

Buyer address

Example: 0xcafe000102030405060708090a0b0c0d0e0fbeefPattern: ^0x[a-fA-F0-9]{40}$
exclusiveSellerstringOptional

Only seller address

Example: 0xcafe000102030405060708090a0b0c0d0e0fbeefPattern: ^$|(^0x[a-fA-F0-9]{40}$)
fqTnstringRequired

Fully Qualified Token Name

Example: com.studio.game.collection.token
pricenumberRequired

Per token price

amountinteger · int64Required

Amount of tokens

Responses
200
OK
*/*
post
POST /marketplace/manage/add-buy-offer-pk HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 180

{
  "buyer": "0xcafe000102030405060708090a0b0c0d0e0fbeef",
  "exclusiveSeller": "0xcafe000102030405060708090a0b0c0d0e0fbeef",
  "fqTn": "com.studio.game.collection.token",
  "price": 1,
  "amount": 1
}
{
  "response": {
    "txHash": "text",
    "description": "text",
    "details": {
      "offerId": 1
    }
  }
}

Remove buy offer

post
Header parameters
X-Auth-KeystringRequiredExample: ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353Pattern: [0-9a-fA-F]{64}
Body
offerIdinteger · int64Required

id of the taken offer

Responses
200
OK
*/*
post
POST /marketplace/manage/remove-buy-offer-pk HTTP/1.1
Host: game-api.openvessel.io
X-Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "offerId": 1
}
{
  "response": {
    "txHash": "text",
    "description": "text",
    "details": "text"
  }
}

Offer Lookup

Lookup sell offer ID by the transaction hash

Returns sell offer ID by transaction hash

get
Path parameters
txIdstringRequired
Responses
200
OK
*/*
get
GET /marketplace/{txId}/sell-offer-id HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": 1
}

Lookup buy offer ID by the transaction hash

Returns buy offer ID by transaction hash

get
Path parameters
txIdstringRequired
Responses
200
OK
*/*
get
GET /marketplace/{txId}/buy-offer-id HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": 1
}

Lookup all sell offers in the game

Returns sell offer ID by transaction hash

get
Path parameters
txIdstringRequired
Responses
200
OK
*/*
get
GET /marketplace/{txId}/sell-offer-id HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": 1
}

Lookup all sell offers in the collection

Returns sell-offers to the user within a collection

get
Path parameters
fqGnstringRequired

Fully Qualified Game Name

Example: com.studio.gamePattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
qCnstringRequired

Qualified Collection Name

Example: armor
Query parameters
userAddressstringOptionalPattern: ^0x[a-fA-F0-9]{40}$
orderBystring · enumOptionalDefault: ID_DESCPossible values:
pageinteger · int32 · max: 99Required

Page number

Example: 0
Responses
200
OK
*/*
get
GET /marketplace/sell-offers/{fqGn}/{qCn} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "currentPage": 1,
    "totalPages": 1,
    "size": 1,
    "numberOfElements": 1,
    "totalElements": 1,
    "items": [
      {
        "id": 1,
        "price": 1,
        "amount": 1,
        "fqTn": "text",
        "sellerAddress": "text",
        "createdAt": 1
      }
    ]
  }
}

Lookup all buy offers in the game

Returns buy-offers to the user within a game

get
Path parameters
fqGnstringRequired

Fully Qualified Game Name

Example: com.studio.gamePattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
Query parameters
orderBystring · enumOptionalDefault: ID_DESCPossible values:
userAddressstringOptionalPattern: ^0x[a-fA-F0-9]{40}$
pageinteger · int32 · max: 99Required

Page number

Example: 0
Responses
200
OK
*/*
get
GET /marketplace/buy-offers/{fqGn} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "currentPage": 1,
    "totalPages": 1,
    "size": 1,
    "numberOfElements": 1,
    "totalElements": 1,
    "items": [
      {
        "id": 1,
        "price": 1,
        "amount": 1,
        "fqTn": "text",
        "buyerAddress": "text",
        "exclusiveSellerAddress": "text",
        "createdAt": 1
      }
    ]
  }
}

Lookup all buy offers in the collection

Returns buy-offers to the user within a collection

get
Path parameters
fqGnstringRequired

Fully Qualified Game Name

Example: com.studio.gamePattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
qCnstringRequired

Qualified Collection Name

Example: armor
Query parameters
userAddressstringOptionalPattern: ^0x[a-fA-F0-9]{40}$
orderBystring · enumOptionalDefault: ID_DESCPossible values:
pageinteger · int32 · max: 99Required

Page number

Example: 0
Responses
200
OK
*/*
get
GET /marketplace/buy-offers/{fqGn}/{qCn} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "currentPage": 1,
    "totalPages": 1,
    "size": 1,
    "numberOfElements": 1,
    "totalElements": 1,
    "items": [
      {
        "id": 1,
        "price": 1,
        "amount": 1,
        "fqTn": "text",
        "buyerAddress": "text",
        "exclusiveSellerAddress": "text",
        "createdAt": 1
      }
    ]
  }
}

Lookup all buy offers by the user

Returns all buy-offers by FQTN with pagination

get
Path parameters
addressstringRequiredPattern: ^0x[a-fA-F0-9]{40}$
Query parameters
orderBystring · enumOptionalDefault: ID_DESCPossible values:
pageinteger · int32 · max: 99Required

Page number

Example: 0
Responses
200
OK
*/*
get
GET /marketplace/buy-offers/users/{address} HTTP/1.1
Host: game-api.openvessel.io
Accept: */*
{
  "response": {
    "currentPage": 1,
    "totalPages": 1,
    "size": 1,
    "numberOfElements": 1,
    "totalElements": 1,
    "items": [
      {
        "id": 1,
        "price": 1,
        "amount": 1,
        "fqTn": "text",
        "buyerAddress": "text",
        "exclusiveSellerAddress": "text",
        "createdAt": 1
      }
    ]
  }
}

Last updated

Was this helpful?