Error: API Error 400: You must approve assets #0 for trading before creating an order
See original GitHub issueHello, I use a new address. I want to use SDK to make offer for an asset. This error occurred when calling createBuyOrder. I guess it should be that I didn’t approve WETH to the Opensea contract.
API Error 400: You must approve assets #0 for trading before creating an order
I traced this problem and found that the executeAllActions method in the @opensea/seaport-js library uses the for () code, and the approve contract call of wet and the createOrder API call at the same time, but createOrder API validate the WETH is approved. So i think we should use for…of or for await to execute the approve first, and then execute the createOrder API call after success. Please confirm whether there is this problem? thx.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5
Top Results From Across the Web
API Error 400 : r/opensea - Reddit
Full error message reads: API Error 400: ["Trading is not enabled for AssetContract(id=92, chain_identifier=ethereum, name=SuperRare, address= ...
Read more >Listing NFT on OpenSea via JS API: Failed to extract transfer ...
You can find Token Standard in Details tab, on Opensea asset page : Failed to extract transfer calldata Error 400.
Read more >Errors by Number - eBay Developers Program
Error number Severity Description
335 Serious Error
12311 Warning Short error: TUV Error Long error: TUV Error
Read more >Tradier - Errors | Brokerage API Documentation
In this case, if you receive a 400 response, you can check the body of the response and find an error message that...
Read more >TWS API v9.72+: Message Codes
Code TWS message Additional notes
106 Can't transmit order ID:
107 Cannot transmit incomplete order. Order is missing a required field.
114 Relative orders are valid...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Praveen-47 Maybe, you can validate the approve and send approve tx before invoke opensea-sdk.
@Praveen-47 It’s the problem of @opensea/seaport-js, it just await tx sending to node, but it not await the tx be included.
https://github.com/ProjectOpenSea/seaport-js/blob/main/src/utils/usecase.ts