Trades v2
Reference for the Trades v2 endpoints on Roblox.
Base URL: https://trades.roblox.com
Endpoints
Section titled “Endpoints”| Method | Path | Name |
|---|---|---|
GET | /v2/trades/:tradeId | getTradesTradeid |
POST | /v2/trades/:tradeId/counter | postTradesTradeidCounter |
POST | /v2/trades/send | postTradesSend |
GET | /v2/users/:userId/can-trade-with | getUsersUseridCanTradeWith |
GET | /v2/users/:userId/tradableItems | getUsersUseridTradableitems |
GET | /v2/users/me/can-trade | getUsersMeCanTrade |
getTradesTradeid
Section titled “getTradesTradeid”GET /v2/trades/:tradeId
Gets the details of a trade.
Usage
import { fetchApi } from 'rozod';import { getTradesTradeid } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(getTradesTradeid, { tradeId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
tradeId | integer | Yes | The id of the trade. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
tradeId | number | |
status | `“Unknown" | "Open" |
participantAOffer | object | See below |
participantBOffer | object | See below |
participantAOffer fields:
| Field | Type | Description |
|---|---|---|
user | object | See below |
robux | number | |
items | object[] | See below |
user fields:
| Field | Type | Description |
|---|---|---|
id | number | |
name | string | |
displayName | string |
items[] item fields:
| Field | Type | Description |
|---|---|---|
collectibleItemInstanceId | string | |
itemTarget | object | See below |
itemName | string | |
serialNumber | number | |
originalPrice | number | |
recentAveragePrice | number | |
assetStock | number | |
isOnHold | boolean |
itemTarget fields:
| Field | Type | Description |
|---|---|---|
itemType | `“Unknown" | "Asset" |
targetId | string |
participantBOffer fields:
| Field | Type | Description |
|---|---|---|
user | object | See below |
robux | number | |
items | object[] | See below |
user fields:
| Field | Type | Description |
|---|---|---|
id | number | |
name | string | |
displayName | string |
items[] item fields:
| Field | Type | Description |
|---|---|---|
collectibleItemInstanceId | string | |
itemTarget | object | See below |
itemName | string | |
serialNumber | number | |
originalPrice | number | |
recentAveragePrice | number | |
assetStock | number | |
isOnHold | boolean |
itemTarget fields:
| Field | Type | Description |
|---|---|---|
itemType | `“Unknown" | "Asset" |
targetId | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 0: An unknown error occured. |
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |
| 403 | 4: You are not authorized to modify this trade. |
| 404 | 0: An unknown error occured. |
postTradesTradeidCounter
Section titled “postTradesTradeidCounter”POST /v2/trades/:tradeId/counter
Counters an existing trade.
Usage
import { fetchApi } from 'rozod';import { postTradesTradeidCounter } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(postTradesTradeidCounter, { tradeId: /* integer */, body: { /* ... */ }});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
tradeId | integer | Yes |
Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
senderOffer | object | See below |
recipientOffer | object | See below |
senderOffer fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
robux | number | |
collectibleItemInstanceIds | string[] |
recipientOffer fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
robux | number | |
collectibleItemInstanceIds | string[] |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
tradeId | number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |
| 403 | 0: Token Validation Failed |
| 404 | 0: An unknown error occured. |
postTradesSend
Section titled “postTradesSend”POST /v2/trades/send
Sends a new trade.
Usage
import { fetchApi } from 'rozod';import { postTradesSend } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(postTradesSend, { body: { /* ... */ }});Request Body
Section titled “Request Body”| Field | Type | Description |
|---|---|---|
senderOffer | object | See below |
recipientOffer | object | See below |
senderOffer fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
robux | number | |
collectibleItemInstanceIds | string[] |
recipientOffer fields:
| Field | Type | Description |
|---|---|---|
userId | number | |
robux | number | |
collectibleItemInstanceIds | string[] |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
tradeId | number |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |
| 403 | 0: Token Validation Failed |
| 404 | 0: An unknown error occured. |
getUsersUseridCanTradeWith
Section titled “getUsersUseridCanTradeWith”GET /v2/users/:userId/can-trade-with
Checks if the user can trade with a specific user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridCanTradeWith } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(getUsersUseridCanTradeWith, { userId: /* integer */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
userId | number | |
targetUserId | number | |
canTrade | boolean | |
mutualTradeEligibility | `“Unknown" | "Eligible" |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |
getUsersUseridTradableitems
Section titled “getUsersUseridTradableitems”GET /v2/users/:userId/tradableItems
Gets tradable items for a user.
Usage
import { fetchApi } from 'rozod';import { getUsersUseridTradableitems } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(getUsersUseridTradableitems, { userId: /* integer */, search: /* string? */, sortBy: /* enum */, limit: /* integer? = 25 */, cursor: /* string? */});Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | The id of the user. |
search | string? | No | Optional search query to filter items by. |
sortBy | enum | Yes | The key to sort tradable items by. |
limit | integer? = 25 | No | The maximum number of items to return. |
cursor | string? | No | The pagination cursor. |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
userId | number | |
items | object[] | See below |
nextPageCursor | string |
items[] item fields:
| Field | Type | Description |
|---|---|---|
collectibleItemId | string | |
itemTarget | object | See below |
itemName | string | |
originalPrice | number | |
recentAveragePrice | number | |
assetStock | number | |
instances | object[] | See below |
itemTarget fields:
| Field | Type | Description |
|---|---|---|
itemType | `“Unknown" | "Asset" |
targetId | string |
instances[] item fields:
| Field | Type | Description |
|---|---|---|
collectibleItemInstanceId | string | |
itemTarget | object | See below |
itemName | string | |
serialNumber | number | |
originalPrice | number | |
recentAveragePrice | number | |
assetStock | number | |
isOnHold | boolean |
itemTarget fields:
| Field | Type | Description |
|---|---|---|
itemType | `“Unknown" | "Asset" |
targetId | string |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 400 | 25: The cursor provided is invalid. |
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |
| 403 | 4: You are not authorized to modify this trade. |
| 404 | 0: An unknown error occured. |
getUsersMeCanTrade
Section titled “getUsersMeCanTrade”GET /v2/users/me/can-trade
Checks if the calling user can trade with others.
Usage
import { fetchApi } from 'rozod';import { getUsersMeCanTrade } from 'rozod/lib/endpoints/tradesv2';
const data = await fetchApi(getUsersMeCanTrade, undefined);Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
userId | number | |
canTrade | boolean | |
tradeEligibility | `“Unknown" | "Eligible" |
Errors
Section titled “Errors”| Status | Description |
|---|---|
| 401 | 0: Authorization has been denied for this request. 4: You are not authorized to modify this trade. |