Questions tagged [0x]
The 0x tag has no usage guidance.
303
questions
0
votes
1
answer
19
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
3
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
339
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
1
answer
462
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
2
answers
311
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
0
answers
19
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
1
answer
26
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
38
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
21
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
14
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
10
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
16
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
2
answers
369
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 ...
0
votes
1
answer
341
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
1
answer
575
views
Is 0x Api perform "Dex aggregator" Swaps internally like 1Inch exchange?
Is 0x Api performing "Dex aggregator" Swaps internally like 1Inch exchange?
1
vote
1
answer
511
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
158
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
35
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 ...
1
vote
1
answer
400
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
0
answers
15
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
1
answer
367
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 ...
0
votes
0
answers
13
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
58
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
2
answers
394
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=...
0
votes
0
answers
26
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
44
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
2
answers
503
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
0
answers
22
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
28
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
90
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
3
answers
845
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 '@...
1
vote
0
answers
39
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 ...
0
votes
1
answer
472
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....
2
votes
0
answers
90
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
10
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
31
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/...
2
votes
1
answer
84
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
476
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 ...
0
votes
0
answers
42
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
51
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
28
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 ...
0
votes
1
answer
32
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
35
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 ...
0
votes
1
answer
42
views
I reported an error during contract interaction
This is my method of obtaining the signer
async function getSigner() {
if (window.ethereum) {
await window.ethereum.enable()
provider = new ethers.providers.Web3Provider(window.ethereum)
// console....
0
votes
0
answers
22
views
Function Visibility specifiers during inheritance
when am overriding a function in solidity must my child function have the same visibility as the parent function? can the parent function be public and the child function be internal
0
votes
0
answers
86
views
0x API key in Client-Side dapp
From the docs, getting started section:
"Starting in June 2023, all API requests without an API key will return an error. Visit 0x Dashboard to get your API key."
"This key is unique ...
0
votes
1
answer
43
views
"Uni::transferFrom: transfer amount exceeds spender allowance" code: 105
I get this error when i'm trying to get a quote for uni to weth swap.
https://goerli.api.0x.org/swap/v1/quote?sellToken=0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984&buyToken=...
0
votes
2
answers
154
views
0xapi swap Asking for a quote for code: 111, reason: 'Gas estimation failed'
const response= await fetch(https://api.0x.org/swap/v1/quote?sellToken=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&buyToken=0x6b175474e89094c44da98b954eedeac495271d0f&sellAmount=100&...
0
votes
0
answers
33
views
Matic address for polygon.api.0x.org/swap/v1/quote
Good morning,
I use the API of 0x and more precisely this route:https://polygon.api.0x.org/swap/v1/quote
I do not understand why we must use the address ...