Marketplace
Marketplace APIs that is used for selling/buying tokens.
Make sure to use your X-Auth-Token when making a POST request. Your X-Auth-Token is the private key associated to your ERC-20 wallet.
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:
ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353
Pattern: [0-9a-fA-F]{64}
Body
buyerstringRequiredExample:
Buyer address
0xcafe000102030405060708090a0b0c0d0e0fbeef
Pattern: ^0x[a-fA-F0-9]{40}$
exclusiveSellerstringOptionalExample:
Only seller address
0xcafe000102030405060708090a0b0c0d0e0fbeef
Pattern: ^$|(^0x[a-fA-F0-9]{40}$)
fqTnstringRequiredExample:
Fully Qualified Token Name
com.studio.game.collection.token
pricenumberRequired
Per token price
amountinteger · int64Required
Amount of tokens
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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:
ababa71162175e6867058b271eea7b5b279326eaf646188ab5e37365f32bb353
Pattern: [0-9a-fA-F]{64}
Body
offerIdinteger · int64Required
id of the taken offer
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
txIdstringRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
txIdstringRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
txIdstringRequired
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
fqGnstringRequiredExample:
Fully Qualified Game Name
com.studio.game
Pattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
qCnstringRequiredExample:
Qualified Collection Name
armor
Query parameters
userAddressstringOptionalPattern:
^0x[a-fA-F0-9]{40}$
orderBystring · enumOptionalDefault:
ID_DESC
Possible values: pageinteger · int32 · max: 99RequiredExample:
Page number
0
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
fqGnstringRequiredExample:
Fully Qualified Game Name
com.studio.game
Pattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
Query parameters
orderBystring · enumOptionalDefault:
ID_DESC
Possible values: userAddressstringOptionalPattern:
^0x[a-fA-F0-9]{40}$
pageinteger · int32 · max: 99RequiredExample:
Page number
0
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
fqGnstringRequiredExample:
Fully Qualified Game Name
com.studio.game
Pattern: ^[a-z]{2,6}\.(\b[a-z0-9-]{1,59}\b)\.(\b[a-z0-9-]{1,59}\b)
qCnstringRequiredExample:
Qualified Collection Name
armor
Query parameters
userAddressstringOptionalPattern:
^0x[a-fA-F0-9]{40}$
orderBystring · enumOptionalDefault:
ID_DESC
Possible values: pageinteger · int32 · max: 99RequiredExample:
Page number
0
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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
Path parameters
addressstringRequiredPattern:
^0x[a-fA-F0-9]{40}$
Query parameters
orderBystring · enumOptionalDefault:
ID_DESC
Possible values: pageinteger · int32 · max: 99RequiredExample:
Page number
0
Responses
200
OK
*/*
400
Bad Request
*/*
401
Unauthorized
*/*
403
Forbidden
*/*
404
Not Found
*/*
405
Method Not Allowed
*/*
409
Conflict
*/*
429
Too Many Requests
*/*
500
Internal Server Error
*/*
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?