---
title: "Get trades by primary trade"
method: GET
path: "/trades/GetTradesByPrimaryTrade"
tags: ["Trades"]
---

# Get trades by primary trade

`GET /trades/GetTradesByPrimaryTrade`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/trades/GetTradesByPrimaryTrade`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/trades/GetTradesByPrimaryTrade/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `subscriberId` integer, required
- `primaryTrade` string, required

## Response `200`

Indicates that the request succeeded and that the requested information is in the response.

- ServiceChannelServicesWebApiModelsResponseTradesGetTradesResponse: Represents the response trades with primary trade
  - `Trades` ServiceChannelServicesWebApiModelsResponseTradesTradeResponse[]: Gets or sets trades.
    - `Id` integer: Numeric identifier of the trade.
    - `Name` string: Trade name.
    - `SubscriberId` integer: Unique subscriber ID.
    - `PrimaryTrade` string: Primary trade name.

## Other responses

- `400`: Bad Request - the request could not be understood or was missing required parameters.
- `401`: The request is not authorized. <br/>Error codes: 504 — API call rejected by security permissions
- `403`: The request is not allowed. <br/>Error codes: 100 — Indicates that the requested resource not allowed for current user
- `500`: Something went wrong, and the server was unable to complete your request. <br/>Error codes: 501 — Internal Error

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
