Skip to main content

Questions tagged [0x]

The tag has no usage guidance.

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

0x API returns invalid result

We've noticed that in one edge case the 0x API returns a weird result. We're trying to get a swap transaction for the exact same token, it works with sellAmount 0.1 BNB but fails with sellAmount of 0....
1 vote
2 answers
421 views

Swap problem with big amounts (PancakeSwap liquidity)

I try to swap some tokens and receive BUSD. When I enter the amount 100_000 for my token, API returns the normal price. But it doesnt work when I increase this amount more then 1_000_000. All ...
1 vote
1 answer
631 views

Selling tokens with fees on Uniswap

I'm attempting to sell a token (0xC5a9BC46A7dbe1c6dE493E84A18f02E70E2c5A32) with fees (5% buy and sell) using the 0x: Exchange Proxy but the transaction fails with Uniswap K. This is the url I'm using ...
0 votes
2 answers
486 views

How to resolve insufficient asset liquidity in 0x on polygon mumbai testnet

I am testing the 0x api to get quote on Mumbai testnet. I want to swap BAL -> wETH. https://mumbai.api.0x.org/swap/v1/quote?buyToken=0x2e3A2fb8473316A02b8A297B982498E661E1f6f5&sellToken=...
1 vote
1 answer
428 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=...
0 votes
1 answer
457 views

How to do swap using encoded function call

I will try to describe my problem as clearly as possible so that I can get feedback on whether I am going in the right direction for resolution. I'm running tests on mainnet fork trying to implement a ...
1 vote
2 answers
672 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....
0 votes
1 answer
1k views

BEP20: transfer amount exceeds allowance

I want to swap bep20 tokens like BUSD - BNB and BNB - BUSD, i already approved tokens for the swapping but while i try to swap BNB - BUSD it's throw error like BEP20: transfer amount exceeds allowance ...
0 votes
2 answers
364 views

charge commission/fee on every DEX transaction using 0x API

I would Like to charge commission/fee on every DEX transaction using 0x API; i am calling GET /swap/v1/quote with adding feeRecipient & buyTokenPercentageFee but when a user does a tranx via the ...
1 vote
3 answers
916 views

How to get a quote and swap on 0x with ethers.js

I'm trying to make a simple swap from 10 USDC to 10 USDT using 0x API quote. I'm doing this: import type { UnsignedTransaction } from '@ethersproject/transactions' import { Web3Provider } from '@...
0 votes
1 answer
593 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....
0 votes
1 answer
495 views

Swap BEP-20 based tokens with 0x and ethers.js

I am trying to swap BEP-20 based tokens with 0x and Ethers.js. https://bsc.api.0x.org/swap/v1/quote I used this endpoint to get quote of the exchange. https://bsc.api.0x.org/swap/v1/quote?sellToken=...
0 votes
1 answer
482 views

how to add my custom token to 0x protocol in testnet/mainnet

I am new to the 0x protocol. Is it possible to add custom token using 0x Portal DApp?. Share any example or document. I have deployed my own exchange medium. it is running in http://localhost:3001 I ...
2 votes
2 answers
141 views

CORS Policy Blocking Axios Request with 0x-api-key Header to 0x API on Goerli Network

I'm currently working on a project where I use the 0x API on the Goerli network to swap tokens. I'm making an HTTP GET request using axios from a web application served from http://localhost:3000. ...
0 votes
1 answer
409 views

Error : code: 105 reason: "SenderNotAuthorizedError"

After fetching the Quote I get this error: Quote: Object code: 105 reason: "SenderNotAuthorizedError" values: {sender: '0xdef1c0ded9bec7f1a1670819833240f027b25eff'} My code is: const ...
0 votes
2 answers
363 views

0x API: Invalid Signature

I found out how to sign an approval into Metamask,in conformity with EIP712: const domain = [ { name: "name", type: "string" }, { name: "version", type: "...
0 votes
1 answer
357 views

Execution of limit orders

Hey I'm thinking of creating a trading platform and wanted to utilize 0x API orderbook in order to provide limit order + depending on the possibilities automatic profit taking and stop loss ...
0 votes
1 answer
342 views

How to swap tokens using 0x using smart contracts only.?

I am building an dApp and want to integrate 0x in the smart contract directly instead of me depending on the http request and passing that. Is there a way to implement 0x directly from the smart ...
1 vote
0 answers
25 views

Any example of a transaction where `feeRecipient` is used in 0x

I need to see what these transactions look like on Etherscan, but can't find any examples. Seems to be very rare. Some transaction hash of such transaction where feeRecipient is receiving some small ...
2 votes
0 answers
79 views

How to really encode dynamicall length array of structs in Solidity ? Or how to use the Muliplex Feature of 0x?

I need to use the Multiplex Feature of 0x in order to perform a specific trade that perform a UniswapV3 call followed by a _FillOTCorder using the SelfBalance feature of the the Multiplex Feature. As ...
1 vote
1 answer
119 views

Why did 0x swap API get deprecated and what is its substitute?

0x swap API was a great project that was under active development for several years. But recently it got deprecated and no longer kept up to date. I could not find any other substitute for it on the ...
0 votes
0 answers
142 views

0x API: Am I able to Swap absolutely NEW coins?

I have a trading bot that operates on newly created tokens in BSC and ETH networks. It works only for new tokens, that were created with WBNB (BSC chain with PancakeSwap) or with WETH (ETH chain with ...
0 votes
1 answer
145 views

0X Swap failing when swapping Token X for Native Currency Smart Contract Integration

i have a contract that i would like to utilize the zeroEx protocol with i am calling the qoute endpoint like this https://bsc.api.0x.org/swap/v1/quote?sellToken=...
0 votes
0 answers
12 views

How Does 0x Protocol Manage Market Impact for Large Limit Orders?

I'm exploring the 0x protocol for decentralized trading and I have a question regarding its handling of large limit orders. I understand that limit orders do not experience slippage by design, as they ...
0 votes
1 answer
166 views

How to sign the hash of a message using EIP712?

There are many guides and online services on how to sign a message using eip712. But they all apply to messages. Now, if I already have the hash of my message, how to use MetaMask without other third ...
0 votes
0 answers
280 views

Execution Reverted: GS013 Error in Safe Wallet During 0x OTC Transaction

I am encountering a 'execution reverted: GS013' error when trying to execute a script that aims to fill an Over-the-Counter (OTC) transaction through Safe Wallet using the 0x protocol. This issue ...
0 votes
0 answers
26 views

getting reverted with reason string 'SWAP_CALL_FAILED' while trying back sell unitymeta Token

const unityMeta = '0xca861e289f04cB9C67fd6b87ca7EAFa59192f164'; const WBNB = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'; const params = { sellToken: unityMeta, buyToken: WBNB, ...
0 votes
1 answer
35 views

Verify signature result return 0x

The return signature result from signMessage method obtained is 0x. How do we handle 0x signer result from frontend? const signer = new ethers.providers.Web3Provider(provider).getSigner(); try { ...
0 votes
0 answers
18 views

Why registerAllowedOrderSigner function doesnt work

i created a limit order. Then what I wanted is to give access to another address who can sign the order on behalf of me. I called the registerAllowedOrderSigner method from the proxy contract and ...
1 vote
0 answers
22 views

What are those trx periodically being sent to the zero address

An example of such trx is the following (0x1c22498f94934e18b32f2fdb00d8bf091af7cd77e8aeea0191f21efc211aeebc) in particular they have a calldata which UTF-8 decoding looks like 'data:application/json,{&...
1 vote
1 answer
650 views

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

Is 0x Api performing "Dex aggregator" Swaps internally like 1Inch exchange?
0 votes
2 answers
191 views

Batch Token Swap using 0x

I'm trying to make a telegram bot that sells all the tokens available on a wallet using Ox API. In order to automate the process with only command, I'm okay with adding the private key to the script. ...
0 votes
1 answer
40 views

How to subscribe to swap events for 0x protocol?

I'm building an nft marketplace and I'm getting the data from reservoir. I have built swap/trade functionality using 0x on my marketplace. I want to now subscribe to swap events on my marketplace. Is ...
0 votes
0 answers
32 views

0x Swap API Is there a recommended approach for handling these error responses uniformly?

Subject: Assistance Request for 0x Integration Description: Hello 0x Support Team, I hope this message finds you well. I am currently in the process of integrating the 0x API into my project, and I've ...
0 votes
0 answers
17 views

does 0xlabs work with all tokens?

Can I use API to make a dapp that lets users buy low mcap tokens? ATM I only get results for tokens like DAI, USDT, ETH. I would've thought if it aggregates uniswap, it'll aggregate any token that's ...
1 vote
1 answer
73 views

Quote from 0x API endpoint feeRecipientTradeSurplus parameter not doing anything?

The documentation for the 0x API "quote" endpoint indicates that adding a feeRecipientTradeSurplus parameter to the query should generate a transaction where any "trade surplus fees&...
0 votes
0 answers
49 views

0x TransformERC20 WalletExecuteDelegateCallFailedError

During simple swap with transformERC20, sometime the transaction revert with IncompleteFillSellQuoteError and WalletExecuteDelegateCallFailedError. I saw on stackexchange that this issue is caused by ...
1 vote
0 answers
109 views

0x protocol swap api not fetching liquidity from pancakeswap

I created a liquidity pool on pancakeswap for an asset pair for goerli network. I get this error when i try and fetch the price. here is the api request https://goerli.api.0x.org/swap/v1/price?...
0 votes
0 answers
23 views

Facing ZIPPO_CONTEXT_INVALID error while fetching price or calling any other api on mumbai testnet

I am trying to call this endpoint on mumbai testnet using 0x protocol and getting the error . { "code": 100, "reason": "Validation Failed", "validationErrors": [...
0 votes
0 answers
29 views

Problem with 0x Protocol API

Is it possible to specify the Maker address of the RFQ order by using get-swap-v1-quote in 0xapi, because I want to trade the order through the specified maker address
2 votes
1 answer
92 views

`ZIPPO_CONTEXT_INVALID` error when querying 0x goerli swap api quote endpoint

When querying the following endpoint and parameters: https://goerli.api.0x.org/swap/v1/quote?buyToken=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&sellAmount=1000000000000&sellToken=...
1 vote
0 answers
59 views

Decode FillQuoteTransformer data in 0x Protocol

I'm trying to decode FillQuoteTransformer input data for 0x protocol. I'm able to decode other transformer very well but am stuck with this one. It does technically decode the data but I'm not sure ...
2 votes
0 answers
91 views

ZIPPO_CONTEXT_INVALID error when querying 0x mumbai api quote endpoint

When querying the following endpoint and parameters: https://mumbai.api.0x.org/swap/v1/quote?sellToken=0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa&buyToken=...
0 votes
0 answers
12 views

Invalid token combination - Arbitrum

Making a quote request on arbitrum request: https://arbitrum.api.0x.org/swap/v1/quote?sellToken=USDC&buyToken=UNI&buyAmount=1000000&includedSources=GMX I get invalid token combination as ...
0 votes
1 answer
33 views

Too few ERC721 Orders on 0x v4 Exchange

I'm trying to grab information about NFT-to-ERC20 swaps conducted over 0x V4 (on Ethereum). My initial intention was to read ERC321OrderFilled events from https://etherscan.io/address/...
0 votes
0 answers
91 views

BNB Swapping using 0x API. Using WBNB, BNB or alternatively?

I am currently developing a service that uses the 0x API to swap tokens on the Binance Smart Chain (BSC). I am trying to enable swaps that involve BNB, the native token of BSC. (For example: sell BNB, ...
0 votes
1 answer
76 views

execution reverted 0x contract on goerli for swap but every transaction fails while giving me the error? although tx object is fine

i am getting the same error on every transaction and its on goelri network, furthermore not supoorting much of pairs. Attaching the image for reference
1 vote
0 answers
29 views

0x ExchangeProxy addresses point to different implementations on Ethereum and Polygon

Why is it that on ethereum the 0xDef1C0ded9bec7F1a1670819833240f027b25EfF contract is a ERC1155OrdersFeature and on Polygon it is a ERC721OrdersFeature? Does is mean that there is no ERC1155 support ...
1 vote
1 answer
36 views

Does 0x still have the condensed RFQ order type, and if so where is its structure defined?

I am looking into the 0x docs at the moment, and get a 404 error when attempting to view the RFQ order type structure in the cheat sheet section. Where can I find this order type's struct? Thanks!
0 votes
0 answers
37 views

[0x https://bsc.api.0x.org/swap/v1/quote? and MultiHop

i'm trying to swap two token on BSC WBNB for BUSD or else with https://bsc.api.0x.org/swap/v1/quote? . All transactions work fine when 0x selected a simple DEX or Multi DEX but failed when 0x ...

1
2 3 4 5 6