Skip to main content

Questions tagged [swap]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Token swap error 0x26 InvalidSplTokenProgram on raydium rust

i'm currently following this repo https://github.com/raydium-io/raydium-contract-instructions/blob/master/client/src/main.rs to perform a raydium swap but when i tried testing, i'm getting error ...
irregular's user avatar
1 vote
0 answers
9 views

How to get token transaction history with sold tokens in specific time range amout in Solana blockchain?

Could someone please guide me on how to retrieve transaction history along with the bought token amounts on the Solana blockchain? Like it is in Dexscrener? .png example below I want to get that ...
Deimantas Maksele's user avatar
0 votes
0 answers
30 views

Partial SPL swap using raydium sdk

I have problem, because I have script, which is buying tokens and then selling it base on set criteria, but it's not working as I would like. Main problem is, whenever I do, script is selling entire ...
FassiS's user avatar
  • 1
0 votes
2 answers
38 views

Can't find token when trying to swap

I have recently created a meme token. I use Phantom Wallet and when I attempt to "swap" SOL to my token(HMT), the token isn't found when searching based on name, symbol, or contract address. ...
BinaryJ's user avatar
  • 11
0 votes
1 answer
36 views

Jupiter v6 Transaction Serialization Failing

I am following along the Jupiter v6 docs to implement the Swap API. I am successfully getting the Quote Response from the v6/quote endpoint. After that I am trying to get the serialized transactions ...
Anish Mukherjee's user avatar
1 vote
0 answers
69 views

"TransactionExpiredBlockheightExceededError: Signature XXX has expired: block height exceeded" when confirming successful transaction

When attempting to use confirmTransaction using the BlockheightBasedTransactionConfirmationStrategy, the call takes a very long time then errors out with "...
Thomas-Sodon's user avatar
1 vote
1 answer
37 views

Sending multiple tokens in one transaction without exceeding transaction limit

I'm making multiple swap tokens soft, so i work with a lot of different SPL tokens. The issue i ran in to is transfering all of this tokens in one or few transactions. Let's say i create one ...
youwish's user avatar
  • 13
0 votes
0 answers
17 views

Private node unable to swap properly

Using self built nodes to send multiple swaps, only a few are verified, and the rest cannot be queried. How to make each swap more efficient so that it can be queried
wang's user avatar
  • 1
0 votes
0 answers
37 views

Process Radium Token Swap in Python

Im a newly on Solana and feel as if my mind is bending xD. Im trying to process a transaction with a function where Ive swapped xxx amount of a token for yyy amount of solana and vice versa to work ...
Matt Halter's user avatar
0 votes
1 answer
48 views

Error failed to send transaction: Transaction signature verification failure

I'm trying to send swap transaction in Raydium using Raydium SDK, I made exactly as their demo, and at first when I tried with private RPC it worked and after I wanted to go production and bought ...
Daniel Kotlarov's user avatar
0 votes
0 answers
33 views

how to do Swap Sol to different coins via TypeScript?

I'm currently working on a project where I need to swap Solana (SOL) for other cryptocurrencies programmatically using TypeScript. I understand the basics of working with blockchain technologies and ...
user12827's user avatar
0 votes
0 answers
40 views

Solana swap on raydium javascript

If I know that baseMint, quoteMint and pair address do I can perform a swap using that information?
Stickmen1's user avatar
0 votes
0 answers
42 views

How to swap SOL token to any token using node.js without using Dex tool

I want to change the SOL token of my wallet to ETH Token using node.js and without using Dex aggregators.
Jason Gray's user avatar
0 votes
0 answers
53 views

Using Look up tables with Raydium swap

I'm currently trying to write a multiple swap transaction (10 swaps) using lookup tables using Liquidity.makeSwapInstructionSimple. When writing standard v0 transactions, you simply pass the LUT to ...
hhoogg's user avatar
  • 1
0 votes
0 answers
44 views

I attempted to swap from USDC to SOL, never received SOL but USDC is gone

I initiated a swap, for 20 USDC to SOL. The USDC is no longer in my wallet, and there is no additional Solana. The Solscan is as follows: https://solscan.io/tx/...
Taylor's user avatar
  • 1
0 votes
1 answer
48 views

How to prevent transactions replay in solana?

Suppose I want to buy a token. If I send 100 transactions to buy it within 1 minute, how can I ensure that only at most 1 of these 100 transactions will be successful?
user2873314's user avatar
1 vote
1 answer
84 views

how to swap between spl tokens inside rust anchor program

I'm going to implement spl token swap with rust inside Anchor project. Basically it's about compounding logic in staking project, so I have to swap reward tokens into stake token and add it to staking ...
cablespecific's user avatar
1 vote
1 answer
105 views

Using durable nonce to reach higher transaction succes

As the network is congested, many tx fail to be executed by the cluster, even with an insane priority fees (0.03+). look like this is due to block hash saturation. Now I wonder if by working with ...
Romeh's user avatar
  • 11
1 vote
2 answers
1k views

Simulate a swap / execute a swap on Raydium in Python

I'm a newby on Solana and 0 understanding of RUST and Typescript. I'm looking for a solution to simulate swap on Raydium using Python, and then also the code to execute the swap. I've been trying to ...
Davide Pasini's user avatar
2 votes
1 answer
200 views

Why can slippage only be set to whole numbers using Raydium Swap SDK?

I am currently using the Raydium SDK to perform token swaps. I use the Percent class from the sdk to create the slippage value which I then use in my transaction, but it seems that this Percent class ...
sashavsthewrld's user avatar
1 vote
1 answer
43 views

what should be value of tokenswapStateAccount when trying to swap

I am using node js @solana/web3 and @solana/spl-token and spl-token-swap libraries to perform a swap of token. I am confused with what should be the value of tokenSwapStateAccount and where would I ...
Prashant Singh's user avatar
0 votes
0 answers
182 views

Trying to Swap SOL for any token using node js

I am writing a node js code to swap SOL token to any token. I am using @solana/spl-token-swap node module for the same. First, I am creating an associated address for the token I am swapping to. I am ...
Prashant Singh's user avatar
0 votes
1 answer
97 views

How can I retrieve the input/output token mint addresses of a Jupiter swap transaction?

I am monitoring swap transactions on Jupiter, but I am encountering an issue because Jupiter uses different routes for transactions each time, resulting in data appearing in different indices. Is ...
Daniil's user avatar
  • 1
0 votes
1 answer
202 views

Swapping a token for SOL on Jupiter. An example from github

I've found this repository https://github.com/jup-ag/sol-swap-flash-fill It claims that it can swap ANY SPL token for SOL. After having examined the code, though, I haven't found any place in it where ...
kriss100's user avatar
0 votes
1 answer
273 views

why the transaction failed?

so I send the transaction const buySign = await connection.sendTransaction(swapTx, [wallet], { skipPreflight: true, preflightCommitment: 'confirmed', maxRetries: 3 }) I get ...
slntrx's user avatar
  • 107
1 vote
2 answers
168 views

Send Jupiter swap tx using Python & Solders

I'm trying to use Jupiter API to swap tokens via python, and i used basically same code it's been around in this forum, which is: swap_instruction = swap_tx_response.json()["swapTransaction"]...
germor197's user avatar
1 vote
1 answer
338 views

How to get transaction data from getParsedTransaction?

I'm currently writing script to track wallet address by using connection.onLogs , and when i got the signature i called getParsedTransaction hoping to get the transaction details such as what wallet ...
irregular's user avatar
1 vote
1 answer
1k views

How to create a Solana Token + Listing on Dexscreen?

I need a little help. My whole project seems to be harder than I thought. I want to create a coin on the Solana blockchain. Since the Solana code is a lot heavier than ETH etc. - there are many ...
Timo's user avatar
  • 11
1 vote
1 answer
728 views

Raydium Swap -- Program log: Error: The amm account owner is not match with this program

Getting this error when attempting a swap on Raydium within the first few seconds of a pool being created. "Program log: Error: The amm account owner is not match with this program "Program ...
Fakebl0ck's user avatar
0 votes
0 answers
96 views

got No instructions provided while doing Liquidity.computeAmountOut

im trying to create pool and right after that perform swap. im getting No instructions provided while doing Liquidity.computeAmountOut. here is my code snippet const poolKeys = Liquidity....
Gensx X's user avatar
0 votes
1 answer
100 views

How to swap assets on-chain on any popular DEX?

I need to create a Program with a function swap_on_dex(...) which will accept an input token with an amount, a target wallet address and execute a swap for SOL (optionally, for other token) on any ...
ursula's user avatar
  • 1
2 votes
0 answers
217 views

Is there any functioning AMM on devnet?

I want to swap my devnet SOL for some other devnet token, for example USDC. Is there any functioning AMM on Devnet where this is possible? Preferably one that automatically handles the wrapping on the ...
Dmitry Sky's user avatar
-1 votes
1 answer
822 views

Interacting with the Raydium API

I don't know much about programming. I want to interact with the Raydium API in order to swap tokens <30 secs after launch. How do I do it? A detailed guide would be great, thanks.
adoonnnnn's user avatar
0 votes
1 answer
162 views

Raydium swap without creating Token Account

My typescripts program swaps tokens but creates an account token each time. I saw on Solscan that it is possible not to create an account. how can I do it, any advice or code? sample transaction: ...
user9036's user avatar
0 votes
0 answers
263 views

How can I make a swap on raydium using typescript on devnet?

My end goal is to create a swap script, where user have SOL, if he does not hold WSOL it get's wrapped into it and then gets swapped with user's entered token address. Can someone help me out?
Dastageer Sayed's user avatar
0 votes
1 answer
98 views

Does token-2022 allow transfer fees in SOL instead of a token?

That is, the receiver of a fee should get a fee not in a token but in SOL. Is it supported by token-2022? I'm aware of transfer hook. Would one use it, send a TX to a DEX such as Raydium? Otherwise, ...
barugaggi's user avatar
1 vote
1 answer
145 views

How to swap SOL <-> token / vise versa but on-chain (in a smart contract)? On Raydium or SolDex

I'm aware of this question How to interact with router for swap transaction? but mine is different. How to swap a token for SOL or vise versa from within a Solana program/smart contract? That is, on-...
barugaggi's user avatar
1 vote
1 answer
435 views

"Solana Transaction Error: Invalid Transaction due to Missing Address Table Account"

I'm encountering an issue while trying to execute a transaction on the Solana blockchain.(swaping solana to bonk using jupiter swap api) When attempting to execute the transaction, I receive the ...
Cosinus basic function's user avatar
-1 votes
1 answer
757 views

Solflare wallet - Swap - Fraud

hoping that you may give me some guidance. 1 - I wanted to buy Jupiter Coin which will come live on 31st Jan. 2 - In my solflare wallet , I had 3.9 Sol. 3 - I used SWAP option and placed my Sol tokens ...
user8543's user avatar
0 votes
0 answers
118 views

Trying to do a DEX CPI to perform fully on-chain swaps

I want to create a fully-onchain swap through any clmm dex so for this example I'm trying through raydium even tho I just want to make it work. I'm using the github repo here to import necessary ...
David's user avatar
  • 1
1 vote
0 answers
30 views

How to complete withdrawal on tokenswap program InstructionError: [ 0, { Custom: 24 }

Keypair, LAMPORTS_PER_SOL, PublicKey, SystemProgram, Transaction, TransactionInstruction, sendAndConfirmTransaction, } from "@solana/web3.js"; import BN from "bn.js"; ...
Mark's user avatar
  • 31
0 votes
0 answers
227 views

Can someone help me with a swap transaction?

sorry to bother but Im struggling since a couple of days. Im new on this but I want to learn. I have a script that listen new pools and try to make a swap. I have SOL on my wallet but keep saying that ...
San Martín Figueroa Pablo's user avatar
0 votes
1 answer
142 views

Unclear parameters for TokenSwap.swapInstruction()

I try to find a solution for my problem since hours but I couldn't find an answer for my question, so you're my last hope. I'm experimenting with spl-token-swap, precisely with TokenSwap....
Stefan D.'s user avatar
  • 181
2 votes
2 answers
3k views

Performing a swap

I am clueless on how to perform a swap (ex. USDT to USDC) on the Solana blockchain on Raydium with code. I am currently using @solana/web3 and also not too familiar when it comes to programming. Any ...
stacksolana's user avatar
1 vote
1 answer
381 views

How to support limit orders on a python bot

I am working on a bot that will swap tokens using python. Currently, my bot uses the dexscreener api to continuously retrieve the current price of the token to determine when to sell. However, this is ...
Ishaq Ruhani's user avatar
0 votes
1 answer
237 views

Jupiter listing delay

I am working on a bot to swap on Jupiter using python. A lot of the tokens I will be swapping will be newer tokens, (within a few minutes of listing and with a few thousand mktcap). However, when I ...
Ishaq Ruhani's user avatar
0 votes
1 answer
467 views

Raydium swap vs CPI Call to Raydium Program

what is the difference between sending a transaction from a client to the Raydium program to make a swap and making your program that does a cpi call to the Raydium program and sending the transaction ...
kc.sol's user avatar
  • 3
0 votes
0 answers
486 views

Send Transaction Error with Raydium

I getting the below error, how fix it? Operation (SWAP): USDC(EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) -> SOL(So11111111111111111111111111111111111111112) Liquidity Pool(Raydium): ...
ZweiDeveloper-L's user avatar
0 votes
1 answer
336 views

How to computeAmountOut in Python?

Assume i have the given information from raydium swap (retrieved it using simulateTransaction): { 'status': 1, 'coin_decimals': 9, 'pc_decimals': 9, 'lp_decimals': 9, 'pool_pc_amount': ...
kokiez's user avatar
  • 125
3 votes
2 answers
7k views

Faster method to retrieve pool keys [Raydium]

Currently I am downloading the whole json file from here https://api.raydium.io/v2/sdk/liquidity/mainnet.json and save it into json file, then get the pool info. Code given below for further ...
kokiez's user avatar
  • 125