Skip to main content

Self Generated SDK's

Our SDK generation flow offers the capability to craft SDKs in over 10 distinct languages. This feature ensures you're equipped with the flexibility to produce SDKs tailored to your precise requirements.

Get Upstox developer API YAML

Download the yaml file from the following link: https://api.upstox.com/v2/api-docs

Offline SDK generation using swagger-codegen-cli

Windows

NOTE

OpenAPI 3.0 is supported only from swagger-codegen-cli-3.x versions.

  • Execute the below command to generate the client in a preferred language.

    • Using online api docs

      java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://api.upstox.com/v2/api-docs -l go -o c:\temp\go_api_client

    • Using yaml file

      java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i api-docs.yaml -l go -o c:\temp\go_api_client

MAC

  • Execute the below command on Mac terminal to download swagger codegen

    brew install swagger-codegen

  • To generate the client in preferred language.

    • Using online api docs

      swagger-codegen generate -i https://api.upstox.com/v2/api-docs -l go -o go_api_client

    • Using yaml file

      swagger-codegen generate -i api-docs.yaml -l go -o go_api_client

tip

-h, --help show this help message and exit.
-l, --lang client language to generate.
-o, --output where to write the generated files (current dir by default).
-i, --input-spec location of the swagger spec, as URL or file (required).

Online SDK generation using swagger editor

  • Open your favourite browser and visit swagger editor.
  • Under the File menu, select the Import file option. Swagger import file
  • Import the downloaded yaml from first section yaml.
  • Click on generate client. Swagger import file
  • Choose language from options provided. Swagger import file
  • A zip file will be downloaded.
  • Extract the zip to use your SDK.
  • Each SDK comes with readme file to know how to install and use SDK.