API Reference

Here you can find the different endpoints available to use across TOTO API. Click into each card to learn more.

circle-info

Once you have an API Key, you can try out various endpoints in the interactive playgroundarrow-up-right.

Base URL

Below is the base URL for requests

Base URL
https://toto.oz.xyz/api/

Full Request URL

An example full request URL will look like this

Full Request URL
https://toto.oz.xyz/api/metadata/get_past_usernames

Example Request

This is what an example request will look like. Note that all current endpoints are POST requests

API_KEY = <API KEY>
base_url = 'https://toto.oz.xyz/api'
namespace = 'metadata'
endpoint = 'get_past_usernames'

username = 'oz_dao'

r = requests.post(
    url=f'{base_url}/{namespace}/{endpoint}',
    headers={
        'accept': 'application/json',
        'x-api-key': API_KEY,
        'Content-Type': 'application/json',
    },
    json={
        'user': username,
        'how': 'username',
        'page': 1,
    }
)

data = r.json()

Last updated