---
title: "Create transaction: stocks order"
method: POST
path: "/{gatewayname}/transaction"
---

# Create transaction: stocks order

`POST /{gatewayname}/transaction`

## Request

- Base URL: `https://gatewayapi.smallcase.com/gateway`
- URL: `https://gatewayapi.smallcase.com/gateway/{gatewayname}/transaction`
- Auth: none required

Create a transactionId for single stock or basket orders

## Path parameters

- `gatewayname` string, required

## Headers

- `x-gateway-secret` string, required
- `x-gateway-authtoken` string, required

## Request body

- object
  - `intent` string, required: Required | Define the intent of transactionId. Value: "TRANSACTION"
  - `orderConfig` object, required: Required | Transact on one or more stocks/ETF
    - `type` string, required: For single stock / basket order, value: "SECURITIES"
    - `securities` object[]: [REQUIRED] Array of object containing details about individual stock / ETF to be transacted in.
      - `ticker` string, required: Use NSE ticker
      - `quantity` integer: Optional | number of shares to be transacted
      - `type` string: Optional | transaction type for order, possible values: "BUY", "SELL"
    - `meta` object: Add custom name and image to the order popup
      - `orderName` string: Name for the basket of stock
      - `orderLogo` string: URL to the logo
  - `notes` string: Optional | upto 256 characters, returned in the transaction response
  - `version` 'v1' | 'v2': Defines which SST order UI flow to be show v1 or v2

## Response `200`

200

- object
  - `success` boolean
  - `errors` unknown
  - `data` object
    - `transactionId` string
    - `expireAt` string

---

[API](https://skmtc.dev/smallcase/apis/single-stock-transactionid.md) - [All operations](https://skmtc.dev/smallcase/apis/single-stock-transactionid/llms.txt) - [OpenAPI document](https://skmtc.dev/smallcase/apis/single-stock-transactionid/revisions/2cd456a33ada?raw)
