Questions tagged [0x]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
83 views

"COMPLETE_FILL_FAILED"error while using 0x Protocol V2 to exchange ERC1155 tokens

I am using 0x protocol V2 forwarder contract. And it's fine to exchange ERC721 token through function marketBuyOrdersWithEth, yet when I tried to exchange ERC1155 tokens, it keeps showing the [error][...
ryan's user avatar
  • 1
0 votes
1 answer
59 views

Ether Lost During ERC 20 Conversion to 3X Short Bitcoin Token

TLDR: I tried to convert $500 USD worth of Eth (~0.181 eth) to an ERC20 token and only received $3 worth of the token. I should have received almost 3 million tokens but I only received 20,000. I ...
schrodingersdog0's user avatar
0 votes
1 answer
62 views

0x Quote API Call returning makerAmount equal 0

I am trying to run this API call: https://polygon.api.0x.org/swap/v1/quote?buyToken=0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756&sellToken=0x580a84c73811e1839f75d86d75d88cca0c241ff4&sellAmount=...
joaoavf's user avatar
  • 103
0 votes
1 answer
133 views

Estimating gas revert transaction using 0x Protocol V4

Whenever I try to estimateGas from a ERC1155Order I got a transaction revert, using Polygon Mumbai with Alchemy. let sellOrder = new ERC1155Order({ direction: TradeDirection.SellNFT, maker: ...
Bernardo's user avatar
0 votes
1 answer
74 views

Cant call swap/v1/tokens

i can't call api swap/v1/tokens I see "cross-origin" err. so what should i do?
Thế Khiêm's user avatar
0 votes
1 answer
61 views

"Error: out of gas" error appears for some prices

I have deployed a local instance of 0X API with the environment variables: CHAIN_ID=250 ETHEREUM_RPC_URL=https://rpc.ftm.tools When trying to get the prices it sometimes works well for some prices ...
eum602's user avatar
  • 1
0 votes
1 answer
87 views

When requesting a quote through 0x API's /swap/v1/quote endpoint, what do I use to batch fill multiple quotes?

I see a function in v3 for limit orders called batchFillOrKill but how do achieve this using the quote endpoint? Is there a function I am just not finding or would I have to code my own logic in my ...
user961300's user avatar
0 votes
1 answer
138 views

Reverted transaction from quote?

Im receiving quotes from the 0x API (with IntentOnFilling and takerAddress specified). Can someone help me with debugging this transaction that was reverted by the exchangeProxy. Quote request was: ...
Vindberg's user avatar
  • 105
1 vote
2 answers
132 views

Swapping tokens when value of sellToken is unknown

I want to swap from 0xdb25f211ab05b1c97d595516f45794528a807ad8(EURS) to 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 (USDC) but the sellAmount is not known upfront and is only known during contract ...
Kunal Jain's user avatar
0 votes
1 answer
84 views

How to config the 0x-api v4 environment variable ORDER_WATCHER_URL?

I'm tring to deploy 0x-api locally, when I use the api /sra/v4/order to create an order, I got the 500 Internal Server Error, the error log is : [1644904993870] INFO (26691 on DESKTOP-VKM9D90): ...
Kenneth Brewer's user avatar
1 vote
1 answer
164 views

Use 0x api to swap tokens with PHP

I'd like to use the 0x api to swap tokens given on certains conditions included in a PHP file. However, it seems 0x api/ecosystem revolves around JS since it has lots of utilities and needs npm to run....
Brandon's user avatar
  • 11
0 votes
1 answer
89 views

0x fail on Optimism network

Recently, I try to swap token with 0x on Optimism network. But some transactions were fail. At first, I thought it was due to insufficient estimatedGas. But it not work when I set a larger number. I'...
Jean's user avatar
  • 1
0 votes
1 answer
83 views

API 0x can't swap and swap back ? i got many to fail

there is not support ? i sent them 1 transaction from smart contact fillQuote( token1, token2, uint256(_sellAmount), address(_allowanceTarget), payable(_to), ...
sattaya git's user avatar
0 votes
1 answer
167 views

Is it required to have an API-Key to do trading with the 0x API (Swap/Quote)?

I am wondering if it's possible to use the 0x API Swap/Quote endpoint and further signing the transaction to the blockchain without an api-key for the API requests? Are there any limitations if I do ...
Vindberg's user avatar
  • 105
0 votes
1 answer
66 views

0x API returning error for getting Fantom quote

The call is this one and fails with a "Server Error" https://fantom.api.0x.org/swap/v1/quote?&buyToken=0x04068da6c83afcfa0e13ba15a6696662335d5b75&sellToken=...
Solerus's user avatar
  • 119
0 votes
1 answer
128 views

how to solve this problem

https://api.0x.org/swap/v1/price?sellToken=WETH&buyToken=WNXM&sellAmount=1000000000000000000 {"code":100,"reason":"Validation Failed","validationErrors":...
LALALA LA's user avatar
0 votes
1 answer
48 views

Quote 0x API always return Cheeswap: K and code 105

I am making this call to get quote and estimated gas: https://bsc.api.0x.org/swap/v1/quote?sellToken=0x2a9718deff471f3bb91fa0eceab14154f150a385&buyToken=0xe9e7cea3dedca5984780bafc599bd69add087d56&...
Angelo Enriquez's user avatar
0 votes
1 answer
69 views

0x Cannot post limit order on ropsten (404 error)

Endpoint - https://ropsten.api.0x.org/sra/v4/order doesn't work anymore (404 error). Faced with this problem only on ropsten. Mainnet works fine. Did 0x change ropsten endpoints?
Danylo Kanievskyi's user avatar
0 votes
1 answer
78 views

Wanted to test the 0x protocol contracts on a testnet but fail to see how to get them deployed

I start here https://github.com/0xProject/protocol and look my way around. From my understanding, if I'm on the right track, I can start with ganache and get test cases and so forth going. Then ...
Krunal Amin's user avatar
0 votes
1 answer
157 views

random WalletExecuteDelegateCallFailedError error with 0x quote api in polygon network

I am calling the quote api in polygon network, and random received the below error response but sometime the same call just works. Can someone please help here. request: The Entire API request: https:/...
Lao T's user avatar
  • 3
0 votes
1 answer
196 views

Issue with 0x quote api

I am calling the quote api, and when passing its response to ethereum.request() for making a transaction, MetaMask pops up a very high tx fees- 1.89 BNB! which is way too high fees for this basic swap ...
VikasGS's user avatar
  • 85
4 votes
2 answers
183 views

0x Handling of tokens with less than 18 decimals

I am trying to create a sell limit order with an 18 decimal ERC20 token as makerToken (makerAmount = 1.5) and a 6 decimal ERC20 token as takerToken (takerAmount 1.1). The order is created but ...
Walodja1987's user avatar
0 votes
1 answer
377 views

Execution reverted on every 0x API transaction Swap on BSC in python

I try to make a swap on BSC using 0x API. All my transaction FAILS (Warning! Error encountered during contract execution [execution reverted]). There shouldn't be any problems with allowance, I can ...
Piotr L's user avatar
0 votes
1 answer
23 views

Any way to disable time sensitive parameters thru the 0x api to get consistent encoded tx data?

Friends, I have noticed that the encoded tx data for any given params you get from the 0x api changes second to second. I noticed it does this even when I hardcode the same salt. I assume this is ...
bitalikvuterin's user avatar
0 votes
1 answer
43 views

Allowing a smart contract to receive a swapped token

I'm currently building a dApp on the Polygon network, and I'd like my users to be able to initiate a swap to USDC through 0x, which in turn gets received by a function on the smart contract. Is this ...
Shiraga's user avatar
0 votes
1 answer
59 views

what happened in this transaction?

ID 0xbb14faf85f1b0bff9b31af11d11b045dd19c244046028ba2d62ece10f974425c basically I had entered an eth-USDC swap through matcha. I even had the USDC in my wallet for like 5 seconds but then I ended up ...
Altyeom's user avatar
0 votes
2 answers
175 views

Signing a 0x limit order as a taker without UI

I have been using the @0x/contract-wrappers to sign a limit order as the taker but I can't find a way to configure a provider that can accept a private key to sign the order rather than using Metamask ...
DangarStu's user avatar
0 votes
1 answer
298 views

How to add transaction deadline?

I am using web3 to make transactions but I am stuck on how can I add transaction deadlines in web3.eth.sendTransaction function. I am using 0x API for getting the swap quote. My code :- await web3.eth....
ninja's user avatar
  • 74
0 votes
1 answer
40 views

Can you run all 0x.js libs from a browser environment?

We're in a Next.js app and attempting to use the client to generate signed messages from Orders. However, we're getting compile errors where it seems as though the lib requires the filesystem Module ...
Anthony Chung's user avatar
0 votes
1 answer
455 views

INSUFFICIENT_ASSET_LIQUIDITY response for the sell amount when calling the Polygon API

When trying to make an api call to Ox through Polygon, I am receiving the following error: { "code": 100, "reason": "Validation Failed", "validationErrors": [ { ...
N. J.'s user avatar
  • 1
0 votes
1 answer
51 views

Transaction failing due to "NotImplementedError"

https://dashboard.tenderly.co/tx/polygon/0x3a6bce4a7c27ce4ad6dc449664f83278d7316c5f189043459f717af2cfe22673/debugger?trace=0.2 I get a reverted transaction using the 0x API however the error message ...
Solerus's user avatar
  • 119
0 votes
1 answer
233 views

How do i get my Mac to give me permission to install Yarn and npx in terminal?

I've done research on how to get permission but it doesn't seem to work. At first I tried on my mac book pro, but after trying for hours I still couldn't seem to get it to work so I switched to my Mac ...
Billyon Brown's user avatar
0 votes
1 answer
61 views

Unable to download build 0x project

I'm trying to follow the instructions on 0x API project, but I see the following message when trying to install dependencies: node-pre-gyp http GET https://0x-neon-router.s3.amazonaws.com/0.3.1/node-...
r2d2's user avatar
  • 1
0 votes
1 answer
80 views

0x Pricing Issues

When using the 0x API to price USDC->DAI on ETH and Polygon, I am getting weird outputs. When I price the slippage on 1mm USDC I see 0bps slippage at ETH and +94bps slippage at Polygon. When ...
pdigopp's user avatar
0 votes
2 answers
340 views

How to bubble up meaningful 0x contract revert data?

I'm fairly new to solidity so thanks in advance for your patience with this question. I'm trying to implement a contract that uses the following line from the 0x sample provided here: https://github....
Aashay Desai's user avatar
0 votes
1 answer
73 views

Add Safemoon Swap as liquidity source

We want to integrate safemoon swap as liquidity source – can it be added for 0x API on BSC? Factory contract: https://bscscan.com/address/0x86a859773cf6df9c8117f20b0b950ada84e7644d
Nico's user avatar
  • 1
0 votes
1 answer
143 views

Does 0x have websocket api on polygon now?

How can I get 0x limit orders list? Does 0x have websocket api on Polygon now? As I know before,0x Websocket API only supportted mainnet.
Nancy's user avatar
  • 1
1 vote
1 answer
46 views

Help regarding website based javascript using 0x for order trades

Hey I apologize in advance, I am very new to a lot of the development regarding this subject. I have written my own erc20 token and was trying to find a way to easily trade it. I am aware of the many ...
Gage's user avatar
  • 11
1 vote
1 answer
345 views

0x bsc api returning the wrong path for Pancakeswap router v2

I query the api for bsc https://bsc.api.0x.org/swap/v1/quote?buyToken=0x368ce786ea190f32439074e8d22e12ecb718b44c&sellToken=0xe9e7cea3dedca5984780bafc599bd69add087d56&sellAmount=...
basedbot's user avatar
1 vote
1 answer
118 views

Enterprise 0x.org API access

We are currently using 0x API for data analysis, but we are getting blocked by the rate limiter many times. I tried to search for 0x Enterprise API Access but couldn't find anything... Does anyone ...
jake's user avatar
  • 11
0 votes
1 answer
150 views

0x transactions failing due to out of gas for swaps consistently

My transactions to swap keep running out of gas and I'm not entirely sure what I'm doing wrong here. I'm generating a quote like below (which is actually a snippet from a 0x repository) const response ...
Andrew's user avatar
  • 1
0 votes
1 answer
168 views

Where is correct information for 0x implementation on Polygon?

We are trying to use 0x protocol for trading ERC721 on Polygon. And I am kind of lost where is correct information. Could someone point to the right direction. Contract addresses: where is correct ...
Alex's user avatar
  • 1
1 vote
1 answer
174 views

MultiHop swap buying less than specified `buyAmount` without reverting

While using the 0xAPI I noticed that when executing "MultiHop" swaps against my local mainnet fork it sometimes obtains less than the specified buyAmount without reverting. Is this expected ...
Chris's user avatar
  • 439
0 votes
1 answer
159 views

0x API Tokens Interface (Deprecated?) and Swap Quote

The 0x API docs say that the token interface is deprecated, but it seems that it's required to know which tokens are supported. For instance, I cannot send any Token symbol to the quote API, it will ...
amaurer's user avatar
  • 13
0 votes
1 answer
156 views

For swapping should i approve 0x contract address or address from function 'getTransformerDeployer' or 'getTransformWallet'

I am building a middleware contract to interact with 0x protocol. so for swapping tokens should I approve(erc20 function) directly 0x address for transferring asset or the address from the function '...
Bhavik Mehta's user avatar
0 votes
1 answer
166 views

Transaction revered when fillOrder on 0x protocol

I am trying to write an app that sells NFT using 0x protocol smart contracts and test it on Mumbai Polygon testnet, Deployed my test ER721 contract and test ERC20 contract. Got 0x contract addresses ...
Alex's user avatar
  • 1
0 votes
1 answer
445 views

Is 0x Api perform "Dex aggregator" Swaps internally like 1Inch exchange?

Is 0x Api performing "Dex aggregator" Swaps internally like 1Inch exchange?
Aroon's user avatar
  • 1
0 votes
1 answer
65 views

0x - Internal error on order API call

I'm receiving an internal error when attempting to place an order on the Avalanche chain. Url: https://api.0x.org/orderbook/v1/order Error: { "code": 100, "reason": "...
Eric's user avatar
  • 1
0 votes
1 answer
357 views

can anyone explain how 0x protocol swap tokens on contract level?

I am building a middleware contract to interact with 0x. but I can't find which function to use in the 0x contract. could anyone help me? can anyone explain how 0x swap tokens on contract level?
Bhavik Mehta's user avatar
0 votes
1 answer
98 views

I am trying to swap Eth to Dai using 0x-Api on on ropsten but my transaction reverted by EVM

Transaction hash: 0x9e4cd796a7f3a299ef412f8268e839e8a1600e01140bd2258d8a9d12ee5bf642 Transaction request we are sending to swap: { allowanceTarget: "0xdef1c0ded9bec7f1a1670819833240f027b25eff&...
Aroon's user avatar
  • 1