Tokens API
The Tokens API allows you to retrieve information about tokens on the Mainsail blockchain network, such as token balances, token metadata, and token transfers.
Query Parameters
- Name
ignoreWhitelist- Type
- boolean
- Description
Whether to ignore the whitelist for tokens in the response. Default value is false.
- Name
whitelist- Type
- array<string>
- Description
An array of token addresses to be included in the response, even if they are not whitelisted.
- Name
page- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/tokens
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 33,
"first": "/tokens?limit=100&page=1",
"last": "/tokens?limit=100&page=1",
"next": null,
"pageCount": 1,
"previous": null,
"self": "/tokens?limit=100&page=1",
"totalCount": 33
},
"data": [
{
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"symbol": "DARK20",
"name": "DARK20",
"decimals": 18,
"totalSupply": "100000000000000000000000000",
"deploymentHash": "2b417063e5c9f93face5387daaf540ee6abbfaa86d0bf525ee45a5885cb31895"
},
{
"address": "0x726fb8cb64fec48c0ba3d71f66273011e7a733ce",
"symbol": "SAM",
"name": "SamCoin",
"decimals": 18,
"totalSupply": "100000000000000000000000000",
"deploymentHash": "88c00c12558ab9277125f6f153ca3a6717e9041ac0ebf2858e74de36297ac8b3"
}
]
}
List a specific token
This endpoint retrieves information about a specific token on the Mainsail blockchain network based on its contract address.
Query Parameters
- Name
address- Type
- string
- Description
The contract address of the token.
- Name
page- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/tokens/0x180a864a755fed0144c622df49b83db577befefb
Response
{
"data": {
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"symbol": "DARK20",
"name": "DARK20",
"decimals": 18,
"totalSupply": "100000000000000000000000000",
"deploymentHash": "2b417063e5c9f93face5387daaf540ee6abbfaa86d0bf525ee45a5885cb31895"
}
}
List Token Holders for a given Token
This endpoint retrieves a paginated list of all token holders for a specific token on the Mainsail blockchain network.
Query Parameters
- Name
address- Type
- string
- Description
The contract address of the token.
- Name
page- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/tokens/0x180a864a755fed0144c622df49b83db577befefb/holders
Response
{
"meta": {
"totalCountIsEstimate": false
},
"results": [
{
"tokenAddress": "0x180a864a755fed0144c622df49b83db577befefb",
"address": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"balance": "99999980999999995000000000"
},
{
"tokenAddress": "0x180a864a755fed0144c622df49b83db577befefb",
"address": "0x2a260a110bc7b03f19C40a0BD04FF2C5DCB57594",
"balance": "12000000000000000000"
},
{
"tokenAddress": "0x180a864a755fed0144c622df49b83db577befefb",
"address": "0xE3c31e486ccA6Eb2093c0F4883Df949d45B021C5",
"balance": "5000000005000000000"
},
{
"tokenAddress": "0x180a864a755fed0144c622df49b83db577befefb",
"address": "0xFcf1DbAEdceFCFc6c290154CAE88dd5Ac6201F1a",
"balance": "2000000000000000000"
}
],
"totalCount": 4
}
Retrieve Token Transfers for a given Token
This endpoint retrieves a paginated list of all token transfers for a specific token on the Mainsail blockchain network.
Query Parameters
- Name
address- Type
- string
- Description
The contract address of the token.
- Name
page- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/tokens/0x180a864a755fed0144c622df49b83db577befefb/transfers
Response
{
"meta": {
"totalCountIsEstimate": false
},
"results": [
{
"transactionHash": "9775226ec4265e7db880133bdb6f805817249a49058cfdd7dc0404358909b8d3",
"from": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"to": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"value": "1231231789789789789789789",
"functionSig": "0xa9059cbb",
"blockNumber": "23055078",
"timestamp": "1772103727729",
"token": {
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"name": "DARK20",
"symbol": "DARK20",
"decimals": 18
}
},
{
"transactionHash": "f0d43432fa851dddd82777798220631c48146df27075933d7e16b03958092abc",
"from": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"to": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"value": "1234567987654321123456000",
"functionSig": "0xa9059cbb",
"blockNumber": "22999529",
"timestamp": "1771500047651",
"token": {
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"name": "DARK20",
"symbol": "DARK20",
"decimals": 18
}
}
]
}
Retrieve all Token Transfers
This endpoint retrieves a paginated list of all token transfers on the Mainsail blockchain network.
Query Parameters
- Name
ignoreWhitelist- Type
- boolean
- Description
Whether to ignore the whitelist for tokens in the response. Default value is false.
- Name
whitelist- Type
- array<string>
- Description
An array of token addresses to be included in the response, even if they are not whitelisted.
- Name
page- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/tokens/transfers
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 100,
"first": "/tokens/transfers?limit=100&page=1",
"last": "/tokens/transfers?limit=100&page=2",
"next": "/tokens/transfers?limit=100&page=2",
"pageCount": 2,
"previous": null,
"self": "/tokens/transfers?limit=100&page=1",
"totalCount": 183
},
"data": [
{
"transactionHash": "9775226ec4265e7db880133bdb6f805817249a49058cfdd7dc0404358909b8d3",
"from": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"to": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"value": "1231231789789789789789789",
"functionSig": "0xa9059cbb",
"blockNumber": "23055078",
"timestamp": "1772103727729",
"token": {
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"name": "DARK20",
"symbol": "DARK20",
"decimals": 18
}
},
{
"transactionHash": "c36bcc646802cb9ceaeb0b2858316a2332f2199c417c4a3331d9bcf7eda58386",
"from": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"to": "0xA5cc0BfEB09742C5e4C610f2EBaaB82Eb142Ca10",
"value": "2000000000000000000",
"functionSig": "0xf053e99f",
"blockNumber": "23050454",
"timestamp": "1772053347625",
"token": {
"address": "0x8444ab9d74212f28e14b089b62ed4a4a7a8fefb3",
"name": "DARK20",
"symbol": "DARK20",
"decimals": 18
}
}
]
}
Request
curl https://testnet.mainsailhq.com/api/tokens/whitelist
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 4,
"first": "/tokens/whitelist?limit=100&page=1",
"last": "/tokens/whitelist?limit=100&page=1",
"next": null,
"pageCount": 1,
"previous": null,
"self": "/tokens/whitelist?limit=100&page=1",
"totalCount": 4
},
"data": [
{
"address": "0x12f6677522292654a231007c47b07971a7610908",
"comment": "SamCoin",
"createdAt": "2026-03-02T15:00:00.000Z"
},
{
"address": "0x180a864a755fed0144c622df49b83db577befefb",
"comment": "The original DARK20",
"createdAt": "2026-03-02T15:00:00.000Z"
},
{
"address": "0x5a223f4434d5bd8478100eeb3b0166a57a26350d",
"comment": "Lorem ipsum (symbol)",
"createdAt": "2026-03-02T15:00:00.000Z"
},
{
"address": "0x881fff36d8dcf2221b4bcf4ab4757124172fdd80",
"comment": "Lorem Ipsum (name)",
"createdAt": "2026-03-02T15:00:00.000Z"
}
]
}