πŸ§€ Cheeze Wizards API

Alchemy's API allows Cheeze Wizard developers to interact with simple, intuitive endpoints and access information about wizards, duels and more.

Getting Started

To start making requests to the Alchemy Cheeze Wizards API, all you'll need is a valid API key and a verified email address. To get your key, just sign up on the Cheeze Wizards developer page and you'll receive one via email. After that, you can use the API endpoints below to get all of the currently released on-chain Cheeze Wizards data.

If at any point you have question, comments, or need support, join us on Telegram. We're happy to help!

NOTE - All requests must have the following headers:

-H "Content-Type: application/json" \
-H "x-api-token: your-api-token" \
-H "x-email: your-email@email.com"

For real tournament data use: MAINNET - https://cheezewizards-mainnet.alchemyapi.io​

For the hackathon and testing use: RINKEBY - https://cheezewizards-rinkeby.alchemyapi.io​

API Calls

GET Wizard by Id

Path Variable

id - the wizard's Id

Returns

  • id - the wizard's Id

  • owner - the address of the wizard's owner

  • affinity - the wizard's affinity:

    • 0 = NOTSET, 1 = NEUTRAL, 2 = FIRE, 3 = WIND, 4 = WATER

  • initialPower - the wizard's initial power at the time of creation

  • power - the wizard's current power

  • eliminatedBlockNumber

    • the block number where the wizard was eliminated, null if the wizard is still alive

  • createdBlockNumber - the block number where the wizard was created

Example

Request

curl -X GET "https://cheezewizards.alchemyapi.io/wizards/1" \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token" \
-H "x-email: your-email@email.com"

Result

{
"id":"1",
"owner":"0xF0128825b0c518858971d8521498769148137936",
"affinity":1,
"initialPower":"777000000000000",
"power":"777000000000000",
"eliminatedBlockNumber":null,
"createdBlockNumber":7914701,
}

GET Wizards by affinity, power, owner

Query Parameters

All query parameters are optional.

  • owner - wizards owned by this address

  • affinity - wizards with this affinity:

    • 0 = NOTSET, 1 = NEUTRAL, 2 = FIRE, 3 = WIND, 4 = WATER

  • minPower - wizards whose current power is greater than or equal to minPower

  • maxPower - wizards whose current power is less than or equal to maxPower

Returns

wizards - a list of wizards

Example

Request

curl "https://cheezewizards.alchemyapi.io/wizards?affinity=4&owner=0xF0128825b0c518858971d8521498769148137936&minPower=100000&maxPower=900000000000000" \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token" \
-H "x-email: your-email@email.com"

Result

{
"wizards":
[{"id":"3",
"owner":"0xF0128825b0c518858971d8521498769148137936",
"affinity":4,
"initialPower":"777000000000000",
"power":"90000000000000",
"eliminatedBlockNumber":null,
"createdBlockNumber":7914701}, ...]
}

GET Duel by Id

Path Variable

id - the duel Id

Returns

  • id - the duel Id

  • wizard1Id - the first wizard involved in the duel

  • wizard2Id - the second wizard involved in the duel

  • affinity1 - the affinity of the first wizard in the duel

  • affinity2 - the affinity of the second wizard in the duel

  • startPower1 - the power of the first wizard before the duel, null if the duel is in progress

  • startPower2 - the power of the second wizard before the duel, null if the duel is in progress

  • endPower1 - the power of the first wizard after the duel, null if the duel is in progress

  • endPower2 - the power of the first wizard after the duel, null if the duel is in progress

  • moveSet1 - moves used by the first wizard during the duel, null if the duel is in progress

  • moveSet2 - moves used by the second wizard during the duel, null if the duel is in progress

  • startBlock - the block number the duel started on

  • endBlock - the block number the duel ended on, null if the duel is in progress

  • timeoutBlock - the block number at which the duel will time out

  • timedOut - true if the duel timed out, false otherwise

  • isAscensionBattle - true if the duel is with an ascending wizard, false otherwise

Example

Request

curl -X GET "https://cheezewizards.alchemyapi.io/duels/1" \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token" \
-H "x-email: your-email@email.com"

Result

{
"id":"0x18d53c42aff5ef1a6603f79c26e4c43fe50c6a270025a94df96332d699e39155",
"wizard1Id":"5991",
"wizard2Id":"5994",
"affinity1":4,
"affinity2":3,
"startPower1":"71099841732970",
"startPower2":"71284821480208",
"endPower1":"142384663213178",
"endPower2":"0",
"moveSet1":"0x0404040404000000000000000000000000000000000000000000000000000000",
"moveSet2":"0x0303030303000000000000000000000000000000000000000000000000000000",
"startBlock":4943216,
"endBlock":4943221,
"timeoutBlock":4943666,
"timedOut":false,
"isAscensionBattle":false
}

GET Duels by block, wizard, status

Query Parameters

All query parameters are optional.

  • wizardIds - duels involving these wizards (coma separated list of wizardIds)

  • excludeInProgress - true for completed duels, false for all duels (default)

  • excludeFinished - true for duels in progress, false for all duels (default)

  • startBlockFrom - duels whose start block is greater than or equal to this block number

  • startBlockTo - duels whose start block is less than or equal to this block number

  • endBlockFrom - duels whose end block is greater than or equal to this block number

  • endBlockTo - duels whose end block is less than or equal to this block number

Returns

duels - a list of duels

Example

Request

curl "https://cheezewizards.alchemyapi.io/duels?startsBlockFrom=4943216&wizardIds=5991,5993" \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token" \
-H "x-email: your-email@email.com"

Result

{
"duels":
[{"id":"0x18d53c42aff5ef1a6603f79c26e4c43fe50c6a270025a94df96332d699e39155",
"wizard1Id":"5991",
"wizard2Id":"5994",
"affinity1":4,
"affinity2":3,
"startPower1":"71099841732970",
"startPower2":"71284821480208",
"endPower1":"142384663213178",
"endPower2":"0",
"moveSet1":"0x0404040404000000000000000000000000000000000000000000000000000000",
"moveSet2":"0x0303030303000000000000000000000000000000000000000000000000000000",
"startBlock":4943216,
"endBlock":4943221,
"timeoutBlock":4943666,
"timedOut":false,
"isAscensionBattle":false}, ... ]
}

​

​

​