curl --request GET \
--url https://www.vibekast.xyz/api/v2/markets/{market}/tradesconst options = {method: 'GET'};
fetch('https://www.vibekast.xyz/api/v2/markets/{market}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.vibekast.xyz/api/v2/markets/{market}/trades"
response = requests.get(url)
print(response.text){
"market": "<string>",
"fromBlock": 0,
"toBlock": 0,
"trades": [
{
"kind": "buy",
"trader": "<string>",
"shares": [
"<string>"
],
"amount": "<string>",
"notional": "<string>",
"fee": "<string>",
"block": 0,
"time": "2023-11-07T05:31:56Z",
"tx": "<string>"
}
],
"hasMore": true,
"complete": true,
"nextFromBlock": 0
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}A market's trades, oldest first, paged by block
Read from the market’s event logs. Start without fromBlock, then pass nextFromBlock while hasMore is true. Once complete is true, the list is final. Pages end on block boundaries, so a page can hold slightly more than limit trades.
curl --request GET \
--url https://www.vibekast.xyz/api/v2/markets/{market}/tradesconst options = {method: 'GET'};
fetch('https://www.vibekast.xyz/api/v2/markets/{market}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.vibekast.xyz/api/v2/markets/{market}/trades"
response = requests.get(url)
print(response.text){
"market": "<string>",
"fromBlock": 0,
"toBlock": 0,
"trades": [
{
"kind": "buy",
"trader": "<string>",
"shares": [
"<string>"
],
"amount": "<string>",
"notional": "<string>",
"fee": "<string>",
"block": 0,
"time": "2023-11-07T05:31:56Z",
"tx": "<string>"
}
],
"hasMore": true,
"complete": true,
"nextFromBlock": 0
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}{
"code": "INVALID_JSON",
"message": "<string>"
}Path Parameters
Market address, or "latest" for the newest market.
^(latest|0x[0-9a-fA-F]{40})$Query Parameters
First block to scan. Defaults to the start of the market.
x >= 0Target trades per page, default 200.
1 <= x <= 1000Response
One page of trades.
0x-prefixed 20-byte address.
^0x[0-9a-fA-F]{40}$-9007199254740991 <= x <= 9007199254740991Last block this page covers, inclusive.
-9007199254740991 <= x <= 9007199254740991Oldest first.
Show child attributes
Show child attributes
More blocks can be scanned right now. Request again with fromBlock = nextFromBlock.
The market is closed and every block has been scanned. No more trades will appear.
Where the next page starts. Null once complete. For an open market that has caught up, poll this later.
-9007199254740991 <= x <= 9007199254740991Was this page helpful?