Skip to content

Trades v1

Reference for the Trades v1 endpoints on Roblox.

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

MethodPathName
GET/v1/trades/:tradeIdgetTradesTradeid
POST/v1/trades/:tradeId/acceptpostTradesTradeidAccept
POST/v1/trades/:tradeId/counterpostTradesTradeidCounter
POST/v1/trades/:tradeId/declinepostTradesTradeidDecline
GET/v1/trades/:tradeStatusTypegetTradesTradestatustype
GET/v1/trades/:tradeStatusType/countgetTradesTradestatustypeCount
POST/v1/trades/expire-outdatedpostTradesExpireOutdated
GET/v1/trades/metadatagetTradesMetadata
POST/v1/trades/sendpostTradesSend
GET/v1/users/:userId/can-trade-withgetUsersUseridCanTradeWith

GET /v1/trades/:tradeId

Gets detailed information about a trade.

Usage
import { fetchApi } from 'rozod';
import { getTradesTradeid } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(getTradesTradeid, {
tradeId: /* integer */
});
NameTypeRequiredDescription
tradeIdintegerYesThe trade id.
FieldTypeDescription
offersobject[]See below
idnumber
userobjectSee below
createdstring
expirationstring
isActiveboolean
status`“Unknown""Open"

offers[] item fields:

FieldTypeDescription
userobjectSee below
userAssetsobject[]See below
robuxnumber

user fields:

FieldTypeDescription
idnumber
namestring
displayNamestring

userAssets[] item fields:

FieldTypeDescription
idnumber
serialNumbernumber
assetIdnumber
namestring
recentAveragePricenumber
originalPricenumber
assetStocknumber
membershipType`“None""BC"

user fields:

FieldTypeDescription
idnumber
namestring
displayNamestring
StatusDescription
4002: The trade cannot be found or you are not authorized to view it.
4010: Authorization has been denied for this request.
4: You are not authorized to modify this trade.
4042: The trade cannot be found or you are not authorized to view it.
5000: An unknown error occured.

POST /v1/trades/:tradeId/accept

Accepts a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidAccept } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidAccept, {
tradeId: /* integer */
});
NameTypeRequiredDescription
tradeIdintegerYesThe trade id.

Type: unknown

StatusDescription
4002: 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.
4010: Authorization has been denied for this request.
4030: Token Validation Failed
5035: Trading system is unavailable

POST /v1/trades/:tradeId/counter

Counters a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidCounter } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidCounter, {
tradeId: /* integer */,
body: { /* ... */ }
});
NameTypeRequiredDescription
tradeIdintegerYesThe trade id.
FieldTypeDescription
offersobject[]See below

offers[] item fields:

FieldTypeDescription
userIdnumber
userAssetIdsnumber[]
robuxnumber
FieldTypeDescription
idnumber
StatusDescription
4002: 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.
4010: Authorization has been denied for this request.
4030: Token Validation Failed
42914: You are sending too many trade requests. Please slow down and try again later.
5020: An unknown error occured.
5035: Trading system is unavailable

POST /v1/trades/:tradeId/decline

Declines a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesTradeidDecline } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(postTradesTradeidDecline, {
tradeId: /* integer */
});
NameTypeRequiredDescription
tradeIdintegerYesThe trade id.

Type: unknown

StatusDescription
4002: 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.
4010: Authorization has been denied for this request.
4030: Token Validation Failed
5035: 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/lib/endpoints/tradesv1';
const data = await fetchApi(getTradesTradestatustype, {
tradeStatusType: /* unknown */,
cursor: /* string? */,
sortOrder: /* enum */
});
NameTypeRequiredDescription
tradeStatusTypeunknownYesThe trade status type.
cursorstring?NoThe paging cursor for the previous or next page.
sortOrderenumYesSorted by trade creation date
FieldTypeDescription
previousPageCursorstring
nextPageCursorstring
dataobject[]See below

data[] item fields:

FieldTypeDescription
idnumber
userobjectSee below
createdstring
expirationstring
isActiveboolean
status`“Unknown""Open"

user fields:

FieldTypeDescription
idnumber
namestring
displayNamestring
StatusDescription
4001: Invalid trade status type.
4010: 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/lib/endpoints/tradesv1';
const data = await fetchApi(getTradesTradestatustypeCount, {
tradeStatusType: /* unknown */
});
NameTypeRequiredDescription
tradeStatusTypeunknownYesThe trade status type to fetch a total count for.
FieldTypeDescription
countnumber
StatusDescription
4001: Invalid trade status type.
4010: 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/lib/endpoints/tradesv1';
const data = await fetchApi(postTradesExpireOutdated, undefined);

Type: unknown

StatusDescription
4010: Authorization has been denied for this request.
4030: Token Validation Failed

GET /v1/trades/metadata

Gets metadata about the trade system.

Usage
import { fetchApi } from 'rozod';
import { getTradesMetadata } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(getTradesMetadata, undefined);
FieldTypeDescription
maxItemsPerSidenumber
minValueRationumber
tradeSystemMaxRobuxPercentnumber
tradeSystemRobuxFeenumber
StatusDescription
4010: Authorization has been denied for this request.

POST /v1/trades/send

Sends a trade.

Usage
import { fetchApi } from 'rozod';
import { postTradesSend } from 'rozod/lib/endpoints/tradesv1';
const data = await fetchApi(postTradesSend, {
body: { /* ... */ }
});
FieldTypeDescription
offersobject[]See below

offers[] item fields:

FieldTypeDescription
userIdnumber
userAssetIdsnumber[]
robuxnumber
FieldTypeDescription
idnumber
StatusDescription
4007: 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.
4010: Authorization has been denied for this request.
4030: Token Validation Failed
42914: You are sending too many trade requests. Please slow down and try again later.
5020: An unknown error occured.
5035: 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/lib/endpoints/tradesv1';
const data = await fetchApi(getUsersUseridCanTradeWith, {
userId: /* integer */
});
NameTypeRequiredDescription
userIdintegerYesThe other user’s id.
FieldTypeDescription
canTradeboolean
status`“Unknown""CanTrade"
StatusDescription
40010: Invalid trade partner. See field for whether the invalid partner is the sender or receiver.
4010: Authorization has been denied for this request.