Skip to content

Stringify Numbers

Some languages, such as Javascript, have no native support for 256-bit integers.

To work around this, you can pass the boolean stringify_numbers option as a parameter to your SQL-endpoint request. This returns all numeric objects (integers and floats) as their string representation.

SQL Query
SELECT token_id FROM ethereum.nfts LIMIT 1

curl --request POST \
     --data '{"sql": "SELECT token_id FROM ethereum.nfts LIMIT 1", "stringify_numbers": True}' \
     --url 'https://api.transpose.io/sql' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: FxKTp6MHpWQDaos8SRnSetdIZiUYLliS' \
SQL Query
SELECT token_id FROM ethereum.nfts LIMIT 1

curl --request POST \
     --data '{"sql": "SELECT token_id FROM ethereum.nfts LIMIT 1", "stringify_numbers": False}' \
     --url 'https://api.transpose.io/sql' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: FxKTp6MHpWQDaos8SRnSetdIZiUYLliS' \

Got questions? Join our Discord

Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.