Ro_py trade error: 400 Bad Request Invalid Trade Partner w/Roblox Trades Api

I am using the ro_py library and I am trying to send a trade to my alt. For some reason, I get an error ‘bad request’. When I test (try it out) this on https://trades.roblox.com/docs#!/Trades/post_v1_trades_send , it says the message “One or more userAssets are invalid. See fieldData for details.” Is my formatting incorrect? How do I send a trade with my inputted info?

Error I “get: ro_py.utilities.errors.BadRequest: [400] Invalid trade partner. See field for whether the invalid partner is the sender or receiver.”

data = {

        "offers": [
            {
                "userId": 121720032,
                "userAssetIds": [
                    1213472762
                ],
                "robux": 0
            },
            {
                "userId": 1002568613,
                "userAssetIds": [
                    564449640
                ],
                "robux": 0
            }
        ]
    }


    trade_req = await self.requests.post(
        url="https://trades.roblox.com/v1/trades/send",
        data=data
    )

    return trade_req.status == 200

Ahoy! I don’t think you will get the help you are looking for swiftly on the DevForum of Roblox, since this is a RobloxAPI Library; I suggest you navigate to the Roblox APIs Discrord. I am unable to provide the link due to Roblox Rules.

1 Like

Thanks for the help! I tried searching for it but I couldn’t get any results. Could you send me an invite to the server through dms? (My Discord is AviaN4#3050)

Sorry for the late reply. You are sending the assetIds instead of the userAssetIds of the items. Each limited item has a unique userAssetId which you can get with the inventory API.

2 Likes