This contains an unofficial OpenAPI 3.0 definitions for
- the Immutable X APIs
- the Gods Unchained APIs
The definitions were created using Stoplight Studio.
You can use the definition to generate your own SDK, or import into your favorite API client such as Insomnia and Postman.
You can find documentation here that has been generated using the definitions. Select the language option on the right side for your client. There is a vanilla Javascript option if you click on the vertical three dots next to the languages, which will show you how to call the API in vanilla JS.
https://imx.readme.io/reference/listcards
Use the openapi-typescript-codegen package to build an SDK complete with Typescript definitions.
If you copy the appropriate reference/*.yaml
file to your project and install openapi-typescript-codegen
,
you can generate the SDK using a script
command in your package.json
:
{
"scripts": {
"gu-client:build": "openapi --input GodsUnchained-API-OpenAPI3.yaml --useOptions --output ./src/gu-api-client"
}
}
These definitions were crafted by hand using the available documentation.
Although a best effort was made to ensure accuracy in results, there may be mistakes in the definition. If you find such a mistake, please open a pull request with the necessary changes.
For many endpoints, model definitions have been created for responses, which a code generator can use to create corresponding classes, or typed interfaces if using a Typescript generator.
The following endpoints were unable to be documented at the time due to unavailability of the documentation:
- https://docs.x.immutable.com/reference/post_v1-signable-deposit-details-1
- https://docs.x.immutable.com/reference/post_v1-signable-order-details-1
- https://docs.x.immutable.com/reference/post_v1-signable-transfer-details-1
- https://docs.x.immutable.com/reference/post_v1-signable-withdrawal-details-1
- Fork this repo
- Use Stoplight Studio to open the repo directory, and make your edits
- Make sure the linter in Stoplight Studio has no errors/warnings
- Make a pull request with your changes
The API definitions depend on the community to keep up-to-date, or until the Immutable team provides an official definition. Use at your own risk, not responsible for losses incurred from an incorrect API definition.