Skip to content

Trades v1

Reference for the Trades v1 endpoints on Roblox.

Base URL: https://trades.roblox.com

Method Path Name
GET /v1/trades/:tradeId getTradesTradeid
POST /v1/trades/:tradeId/accept postTradesTradeidAccept
POST /v1/trades/:tradeId/counter postTradesTradeidCounter
POST /v1/trades/:tradeId/decline postTradesTradeidDecline
GET /v1/trades/:tradeStatusType getTradesTradestatustype
GET /v1/trades/:tradeStatusType/count getTradesTradestatustypeCount
POST /v1/trades/expire-outdated postTradesExpireOutdated
GET /v1/trades/metadata getTradesMetadata
POST /v1/trades/send postTradesSend
GET /v1/users/:userId/can-trade-with getUsersUseridCanTradeWith

GET /v1/trades/:tradeId

Gets detailed information about a trade.

Usage
import { fetchApi } from 'rozod';
import { getTradesTradeid } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(getTradesTradeid, {
tradeId: /* integer */
});
Name Type Required Description
tradeId integer Yes The trade id.
Field Type Description
offers object[] See below
id number
user object See below
created string
expiration string
isActive boolean
status `“Unknown” “Open”

offers[] item fields:

Field Type Description
user object See below
userAssets object[] See below
robux number

user fields:

Field Type Description
id number
name string
displayName string

userAssets[] item fields:

Field Type Description
id number
serialNumber number
assetId number
name string
recentAveragePrice number
originalPrice number
assetStock number
membershipType `“None” “BC”

user fields:

Field Type Description
id number
name string
displayName string
Status Description
400 2: The trade cannot be found or you are not authorized to view it.
401 0: Authorization has been denied for this request.
4: You are not authorized to modify this trade.
404 2: The trade cannot be found or you are not authorized to view it.
500 0: An unknown error occured.

POST /v1/trades/:tradeId/accept

Accepts a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidAccept } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidAccept, {
tradeId: /* integer */
});
Name Type Required Description
tradeId integer Yes The trade id.

Type: unknown

Status Description
400 2: The trade cannot be found or you are not authorized to view it.
3: The trade is inactive.
4: You are not authorized to modify this trade.
6: Trade needs to be confirmed by the other party.
6: Trade needs to be confirmed by the other party.
7: The user cannot trade. See field for whether the user who cannot trade is the sender or receiver.
23: The trade reaches Two Step Verification thresholds and the user has not verified in the past time threshold.
401 0: Authorization has been denied for this request.
403 0: Token Validation Failed
503 5: Trading system is unavailable

POST /v1/trades/:tradeId/counter

Counters a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidCounter } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidCounter, {
tradeId: /* integer */,
body: { /* ... */ }
});
Name Type Required Description
tradeId integer Yes The trade id.
Field Type Description
offers object[] See below

offers[] item fields:

Field Type Description
userId number
userAssetIds number[]
robux number
Field Type Description
id number
Status Description
400 2: The trade cannot be found or you are not authorized to view it.
4: You are not authorized to modify this trade.
7: The user cannot trade. See field for whether the user who cannot trade is the sender or receiver.
8: The trade request should include offers.
9: Invalid number of trade offers.
10: Invalid trade partner. See field for whether the invalid partner is the sender or receiver.
11: Cannot add negative Robux amounts to a trade.
12: One or more userAssets are invalid. See fieldData for details.
13: Invalid number of userAssets in one side of the trade.
15: The trade is unbalanced.
16: Trade value ratio is not sufficient.
17: You have insufficient Robux to make this offer.
18: Too many Robux in one side of the offer. See field for whether the side is the sender or receiver.
19: Unknown error while processing the trade.
21: Cannot trade with yourself.
22: User's privacy settings are too strict to allow trading. See field for whether the user is the sender or receiver.
401 0: Authorization has been denied for this request.
403 0: Token Validation Failed
429 14: You are sending too many trade requests. Please slow down and try again later.
502 0: An unknown error occured.
503 5: Trading system is unavailable

POST /v1/trades/:tradeId/decline

Declines a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidDecline } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidDecline, {
tradeId: /* integer */
});
Name Type Required Description
tradeId integer Yes The trade id.

Type: unknown

Status Description
400 2: The trade cannot be found or you are not authorized to view it.
3: The trade is inactive.
4: You are not authorized to modify this trade.
7: The user cannot trade. See field for whether the user who cannot trade is the sender or receiver.
401 0: Authorization has been denied for this request.
403 0: Token Validation Failed
503 5: Trading system is unavailable

GET /v1/trades/:tradeStatusType

Fetches a list of the authenticated user’s trades.

Usage
import { fetchApi } from 'rozod';
import { getTradesTradestatustype } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(getTradesTradestatustype, {
tradeStatusType: /* unknown */,
cursor: /* string? */,
sortOrder: /* enum */
});
Name Type Required Description
tradeStatusType unknown Yes The trade status type.
cursor string? No The paging cursor for the previous or next page.
sortOrder enum Yes Sorted by trade creation date
Field Type Description
previousPageCursor string
nextPageCursor string
data object[] See below

data[] item fields:

Field Type Description
id number
user object See below
created string
expiration string
isActive boolean
status `“Unknown” “Open”

user fields:

Field Type Description
id number
name string
displayName string
Status Description
400 1: Invalid trade status type.
401 0: Authorization has been denied for this request.

GET /v1/trades/:tradeStatusType/count

Gets the total number of pending trades for the authenticated user.

Usage
import { fetchApi } from 'rozod';
import { getTradesTradestatustypeCount } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(getTradesTradestatustypeCount, {
tradeStatusType: /* unknown */
});
Name Type Required Description
tradeStatusType unknown Yes The trade status type to fetch a total count for.
Field Type Description
count number
Status Description
400 1: Invalid trade status type.
401 0: Authorization has been denied for this request.

POST /v1/trades/expire-outdated

Deprecated. TradeSession are automatically set to expire while the inbound/outbound trades are fetched.

Usage
import { fetchApi } from 'rozod';
import { postTradesExpireOutdated } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(postTradesExpireOutdated, undefined);

Type: unknown

Status Description
401 0: Authorization has been denied for this request.
403 0: Token Validation Failed

GET /v1/trades/metadata

Gets metadata about the trade system.

Usage
import { fetchApi } from 'rozod';
import { getTradesMetadata } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(getTradesMetadata, undefined);
Field Type Description
maxItemsPerSide number
minValueRatio number
tradeSystemMaxRobuxPercent number
tradeSystemRobuxFee number
Status Description
401 0: Authorization has been denied for this request.

POST /v1/trades/send

Sends a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesSend } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(postTradesSend, {
body: { /* ... */ }
});
Field Type Description
offers object[] See below

offers[] item fields:

Field Type Description
userId number
userAssetIds number[]
robux number
Field Type Description
id number
Status Description
400 7: The user cannot trade. See field for whether the user who cannot trade is the sender or receiver.
8: The trade request should include offers.
9: Invalid number of trade offers.
10: Invalid trade partner. See field for whether the invalid partner is the sender or receiver.
11: Cannot add negative Robux amounts to a trade.
12: One or more userAssets are invalid. See fieldData for details.
13: Invalid number of userAssets in one side of the trade.
15: The trade is unbalanced.
16: Trade value ratio is not sufficient.
17: You have insufficient Robux to make this offer.
18: Too many Robux in one side of the offer. See field for whether the side is the sender or receiver.
19: Unknown error while processing the trade.
21: Cannot trade with yourself.
22: User's privacy settings are too strict to allow trading. See field for whether the user is the sender or receiver.
23: The trade reaches Two Step Verification thresholds and the user has not verified in the past time threshold.
401 0: Authorization has been denied for this request.
403 0: Token Validation Failed
429 14: You are sending too many trade requests. Please slow down and try again later.
502 0: An unknown error occured.
503 5: Trading system is unavailable

GET /v1/users/:userId/can-trade-with

Returns whether you can trade with another user.

Usage
import { fetchApi } from 'rozod';
import { getUsersUseridCanTradeWith } from 'rozod/endpoints/tradesv1';
const data = await fetchApi(getUsersUseridCanTradeWith, {
userId: /* integer */
});
Name Type Required Description
userId integer Yes The other user’s id.
Field Type Description
canTrade boolean
status `“Unknown” “CanTrade”
Status Description
400 10: Invalid trade partner. See field for whether the invalid partner is the sender or receiver.
401 0: Authorization has been denied for this request.