Questions tagged [0x]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer
1k views

Decentralized Exchanges with Market Orders

My goal is to make a market order (sell/buy) from a smart contract without a centralized app feeding in the order data. E.g. buy token X for 1 ETH at current market. 0x Project So far I stumbled ...
Andi Giga's user avatar
  • 439
4 votes
2 answers
209 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
2 votes
1 answer
1k views

Member "concat" not found or not visible after argument-dependent lookup

I'm trying to concatenate a series of strings but I'm getting the following error: TypeError: Member "concat" not found or not visible after argument-dependent lookup in bytes storage ...
dNyrM's user avatar
  • 936
2 votes
1 answer
710 views

0x: Is it possible to fill an order from a smartcontract?

When I try to fill an order with funds from a contract I get the following generic error: Error: Transaction: 0x1d3161cd7f318c3b0b28fc34b2c6bca0cbf4efdb3b11fcf7ec3af7c9adfd821b exited with an ...
jasper's user avatar
  • 689
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=...
Luckydev's user avatar
2 votes
2 answers
133 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. ...
Kyle Noll's user avatar
2 votes
1 answer
303 views

How to check and Increase API rate limit on 0x?

I am using 0x API for my dex and I am expecting at least 4k users on my app. But I don't see any subscription plan or anything on 0x documentation to increase or at least know my API rate limits. Is ...
Mohit's user avatar
  • 124
2 votes
0 answers
75 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 ...
user2284570's user avatar
  • 1,018
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=...
TCusi's user avatar
  • 21
2 votes
1 answer
158 views

Reducing CallData Size

I have an implementation where I'm needing to send 0x parameters (from the API) to a swap function that's being used in another function's logic. To pass the data over a struct is being used, which is ...
0xintegrator's user avatar
2 votes
1 answer
192 views

Tracking orders on 0x network

How are the various 0x network order trackers sourcing on-chain settlement data? My first assumption was that they were utilising the Etherscan API, however Etherscan have their own tracker, found at ...
user72364's user avatar
  • 135
1 vote
2 answers
170 views

Trade resulting in incorrect ratio for value traded out-of and into

I am helping a friend try to recover approximately $36K of value traded through an 0X router. We have been given the run-around on multiple customer supports each one pointing to a different entity ...
Rome Montle's user avatar
1 vote
3 answers
517 views

Get the token id from 0x number

How can I use ethers.js to get the token id (34797) from this 0x number? 0x0000000000000000000000000000000000000000000000000000000000034797 I'm not sure which util to use from ethers.js I've looked ...
jinsley8's user avatar
1 vote
1 answer
100 views

0x protocol - Using the qoute endpoint without takerAddress parameter

I want to use the 0x quote api endpoint (https://docs.0x.org/0x-api-swap/api-references/get-swap-v1-quote). When requesting a swap, i do not know the takerAddress since at request time i do not know ...
Plus Ultra's user avatar
1 vote
1 answer
367 views

Approving tokens after flash loan

I'm creating a smart contract that can both make flash loans and swap tokens via 0x. I can call the flash loan and token swap functions just fine, but when I try to call the token swap within the ...
kingfish's user avatar
1 vote
1 answer
307 views

How to submit a swap using EIP-1559 style?

I'd like to submit a swap to 0x using an eip1559 style transaction, but am unable to figure out how this should be done. Can someone provide some guidance on how to achive this using web3, in a ...
Degen Duck's user avatar
1 vote
1 answer
109 views

0x API swap destination address

Looks like there is no way to specify destination address for the swap function, is it so? Is there a way such that the swapped to tokens will be sent to another address, but not the original sender's?...
michaelr524's user avatar
1 vote
1 answer
185 views

0x API Help: Order Routing

Our project is working to integrate order routing for the trading feature on our application, and we are exploring using the 0x API for this purpose. The design of our system is such that we intend to ...
CubanPete's user avatar
1 vote
1 answer
70 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&...
MidnightLightning's user avatar
1 vote
1 answer
611 views

How to swap using 0x from a smart contract without using the API?

Is it possible for a smart contract to swap using 0x without receiving the calldata from outside? I know how to make my deployed contract to swap with 0x by creating a fillQuote function and passing ...
lewa's user avatar
  • 11
1 vote
1 answer
70 views

How buyTokenPercentageFee is calculated in 0x

I am using a 0x Quote API to convert BUSD to USDC by exploring the feeRecipient and buyTokenPercentageFee but have confusion in the calculation. Initial Quote without buyTokenPercentageFee Request ...
Gourav's user avatar
  • 35
1 vote
2 answers
835 views

Invalid transaction key: price - Swap Transaction fails using ethers.js on Ropsten

I am trying sell ETH and buy DAI. Trying to test it on Ropsten but the transaction fails saying - invalid transaction key - price. Here is the my code let wallet = new ethers.Wallet(wallet_privateKey);...
HouseHunt's user avatar
1 vote
2 answers
290 views

Sent to contract address

Hi I made a mistake by sending my WETH to the WETH contract address is there a way to recover my funds? I'll send proof of the transaction. ...
Bleu's user avatar
  • 11
1 vote
2 answers
46 views

0x API Help: Is this bandwith consumption normal for 0x api?

thanks for stopping by my question. I'm implementing a bot that uses the /quote endpoint of 0x API to check some trading prices. The 0x application is dockerized, together with postgreSQL and redis, ...
Pablo's user avatar
  • 21
1 vote
2 answers
212 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
1 vote
1 answer
229 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
1 vote
1 answer
630 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
  • 11
1 vote
1 answer
152 views

TRANSFORM ERC 20 vs Sell to pancake swap

I am able to do the Sell to pancake swap tranx But failed with the API when i do TRANSFORM E R C20 Tranx example of failed: https://bscscan.com/tx/...
Taha Dhailey's user avatar
1 vote
2 answers
228 views

Failed to swap BEP20 > BNB, WalletExecuteDelegateError

I try to use 0x Swap rest API to swap a token. buyToken=0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82 sellToken=0x07515f6d56879040b02c4d355df62ec5aede4c7e But i got WalletExecuteDelegateCallFailedError, ...
Its Wawan's user avatar
  • 113
1 vote
1 answer
553 views

List of tokens available to trade via Ox API (Avalanche)

I'm trying to trade TEDDY on Avalanche via 0x, when I call the tokens API curl -X 'GET' 'https://avalanche.api.0x.org/swap/v1/tokens' -H 'accept: application/json' I only get AVAX, WAVAX, and WETH, ...
Carlos Reyes's user avatar
1 vote
1 answer
424 views

0x exchange v3 debugging (execution reverted, more details inside)

I am trying to swap the erc721 token for erc20 using the 0x protocol which I deployed on the testnet. Using the following script to perform the swap: /** * Local, Data & Env imports * Exchange....
hack3r-0m's user avatar
  • 1,919
1 vote
1 answer
81 views

is it possible to remapping directly from etherscan

I have one contract from etherscan and I'm the settings remapping one dependency on the root path that I don't own, is it possible to override it ? "remappings": [ "@0x/contracts-...
Joshua Guessennd's user avatar
1 vote
1 answer
615 views

what is the role of relayer in 0x protocol?

I understand that 0x protocol allows orders to be transmitted across off chain channel to reach large audience and potential buyers/sellers. However, I don't get what a Relayer is exactly.
Davide C's user avatar
  • 896
1 vote
0 answers
20 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 ...
Ojuswi Rastogi's user avatar
1 vote
1 answer
96 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 ...
Ehsan Khodarahmi's user avatar
1 vote
0 answers
19 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,{&...
Mattiatore's user avatar
1 vote
0 answers
81 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?...
ShisukeUrahara's user avatar
1 vote
0 answers
49 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 ...
Nischit Pradhan's user avatar
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 ...
AFMeirelles's user avatar
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!
James's user avatar
  • 11
1 vote
0 answers
49 views

CORS Issue with the /quote 0x API endpoint

I'm a new web2 fullstack web dev trying to get his feet in web3 and i've tried to create my first web3 dApp. For the profile section and displaying a users' NFT and tokens balances I easily managed my ...
GetMoustache's user avatar
1 vote
1 answer
32 views

0x swap Expected quote.orders to conform to schema /signedOrdersSchema

Hi i should like to know if the fonction "swapQuoteConsumer.executeSwapQuoteOrThrowAsync(quote,{opt})" is depreciated in 0x protocol V4 or not ? i have a perdsistent "error Expected ...
AMT AMT's user avatar
  • 11
1 vote
1 answer
274 views

Call Requests Limit

I made a bot swap on bsc network using 1inch 0x and para swap.. everything is great except one thing which is Call requests I can’t make call every 1 sec for more than 1 token when make 2 tokens my ip ...
Nashwan Salah's user avatar
1 vote
1 answer
101 views

0x swap api gas is doubled when adding feeRecipient and buyTokenPercentageFee

I would like to collect fees on trade using 0x API. But the gas in the quote response is doubled or more when adding feeRecipient and buyTokenPercentageFee which doubles the gas price users are paying....
mtx dev's user avatar
  • 11
1 vote
2 answers
70 views

Wallet Integration with 0x

We are building a decentralized wallet. There are some questions about the integration with 0x. Is there any direct way to add fee If there is any API parameters to add fee. Please share your ...
vishnu's user avatar
  • 11
1 vote
0 answers
133 views

0x API buy USDC with ETH works, buy ETH with USDC fails

have been building a little front end app to execute trades back and forth between ETH and USDC, partly to learn and partly to build a tool I want to exist. I have all the quotes and stuff working OK, ...
user2863033's user avatar
1 vote
1 answer
44 views

Customize 0x API to get more details

we are testing the 0x API our goal is to get more details, like the top 5 rates along with the best rate also routing information can anyone point me in the right direction, please by default, it only ...
Abhishek Wakharkar's user avatar
1 vote
0 answers
100 views

Is there an API to create/remove Liquidity Pools on different DEXes?

I'm looking for a way to automate liquidity allocation into the most profitable pools, for this, I need the ability to create/remove liquidity pools on the most popular DEXes. At a low level to do ...
vach's user avatar
  • 111
1 vote
1 answer
53 views

Problem using 0x polygon API - 500 - reason: 'relation "valid_signed_orders_v4" does not exist'

I am attempting to use the 0x Orderbook API for Polygon. I think there might be an issue with the API though, as whilst I remember it previously working, it doesn't seem to be anymore. I'm getting the ...
talos's user avatar
  • 11
1 vote
1 answer
602 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 ...
samusJ3311's user avatar

1
2 3 4 5 6