Skip to main content

Questions tagged [python]

The tag has no usage guidance.

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

Recursively identify associated wallet addresses

I'm looking for guidance or tools to help with a project involving the recursive exploration of blockchain addresses. My goal is to trace all associated wallet addresses by following every transaction ...
nullnav's user avatar
1 vote
2 answers
32 views

How to fetch the current list of SPL tokens?

I'm looking to programmatically fetch the (full) official list of SPL tokens so that I can do a fuzzy search on ticker symbols. For a given input string, I would like to get a dictionary of all token ...
K-83Rick's user avatar
0 votes
1 answer
51 views

How do you decode Raw Instruction Data using Python?

I want to get Sol reserves and token reserves for a newly create pump.fun token. On Solscan, I can see these values in the inner instructions of the tokens creation signature. Heres an example: https:/...
Shane Marotta's user avatar
0 votes
0 answers
19 views

solana.rpc.core.RPCException: RpcCustomErrorFieldless.TransactionSignatureVerificationFailure

py code: import asyncio import base64 import base58 from solana.rpc.async_api import AsyncClient from jupiter_python_sdk.jupiter import Jupiter from solders import solders from solders.keypair import ...
Funny Videos's user avatar
0 votes
0 answers
46 views

how to decode the instruction data raw

for example: here is the transaction https://solscan.io/tx/4Rh5uqvNXGydLKSRbgJX8ESsNEXdQDntHELtK7shRSUVTxuhkpitSnx2KLXt3usZ6nySBw4DXvEQVS7nV6z3ZoRV I get the transaction detail and gain the ...
joshua joshua deng's user avatar
0 votes
2 answers
74 views

Python Solana bot transaction issues

I’m attempting to create a solana bot that has limit order to buy $MAGA using raydium. However everytime i run the code, the transaction does not go through. <!-- begin snippet: js hide: false ...
cypher's user avatar
  • 11
0 votes
0 answers
21 views

pyo3_runtime. PanicException: called 'Result: :unwrap()

I got some error like that sometimes it is work well but sometimes it gets that error I tried try, except code but it doesnt work. note: run with 'RUST_BACKTRACE=1 environment variable to display a ...
Junhwan's user avatar
0 votes
0 answers
26 views

Unable to confirm transaction with python

while I implement swap spl token in python with solana library It was start appear when I change my rpc to alchemy free rpc solana.rpc.core.UnconfirmedTxError: Unable to confirm transaction ...
aaf s's user avatar
  • 1
0 votes
1 answer
38 views

on-chain neural network?

I’m curious to learn if anyone has attempted to use Solana to store and run a Neural Network on-chain? Essentially having each weight stored as an account, and each layer as an account of weight-...
P-Rod's user avatar
  • 103
2 votes
1 answer
87 views

How to obtain the top 5 holders of a Solana token using getProgramAccounts?

I've been trying to use the getProgramAccounts method in the Solana Python API to get the top 5 holders of a specific token. My code looks like this: from solana.rpc.types import MemcmpOpts from ...
Nerevaine's user avatar
  • 159
0 votes
0 answers
38 views

How do I make transaction instructions to swap on Raydium?

I'm trying to create transaction instructions to swap the raydium of a token. How could I do this? I would like some example. I'm using python to do this. transaction = Transaction() ...
Gabriel novais's user avatar
2 votes
1 answer
97 views

How to Obtain the Metadata URI of a Solana Token Using Python

I am trying to obtain the metadata URI of a Solana token using Python. Specifically, I need to fetch the description and images associated with the token. Currently, I am using DexScreener to get some ...
Nerevaine's user avatar
  • 159
0 votes
1 answer
91 views

Trying to do a token swap using Jupiter with Python

I am trying to swap SOL for GME in this example but the swap does not occur? I am following the documentation from Jupiter here: https://station.jup.ag/api-v6/post-swap I change the swap response (not ...
Solano Manlet's user avatar
0 votes
1 answer
96 views

Comparing Performance: Python/JavaScript vs. Rust for Solana API Interaction

I am exploring the performance differences between Python/JavaScript and Rust when interacting with the Solana blockchain. I understand that Rust, being a low-level language without a garbage ...
Nerevaine's user avatar
  • 159
1 vote
1 answer
177 views

How to Track Token Buy/Sell Transactions for a Wallet via an API

I am working on a project where I need to monitor when a specific wallet buys or sells tokens. While I am familiar with using getAccountInfo to obtain information about what an account currently holds,...
Nerevaine's user avatar
  • 159
0 votes
2 answers
666 views

Seeking API for Real-Time Token Pricing and Market Cap on Solana ( Using Python)

Solana community! I am developing a Python application that requires real-time data on cryptocurrency prices and market capitalization for specific tokens on the Solana blockchain. My initial research ...
Nerevaine's user avatar
  • 159
1 vote
1 answer
57 views

How to Retrieve Token Metadata Including Social Networks in URI Using Python

I'm working on a project where I need to extract metadata from a token, specifically the social networks listed in its URI. I've attempted to use the getAccountInfo method via websockets, but it didn'...
Nerevaine's user avatar
  • 159
0 votes
1 answer
55 views

Title: Error -32601 "Method not found" When Calling `getAccountInfo` in JSON-RPC API

I'm encountering an issue with the JSON-RPC API when trying to use the getAccountInfo method. Despite using the correct method structure (as I have successfully used similar structures for other ...
Nerevaine's user avatar
  • 159
1 vote
1 answer
24 views

How to convert mnemonic to Pub key

Ive been playing around SOL rn but I cant get my mnemonic to convert to the correct pub key It does spit out one keypair but its not correct it is valid tho here is my code from solana.keypair import ...
jakub's user avatar
  • 11
0 votes
0 answers
24 views

How can I get historical swaps/syncs or transactions (including amount and price) from dex pool (i.e. RAY/SOL) [duplicate]

new to sol from eth, wondering if there is an equivalent to querying block by block and getting sync/swap pool price and amount. Thank you in advance
ethprinter's user avatar
0 votes
0 answers
147 views

tracking solana transfers from wallet via python

I am trying to retrieve all solana transfers from an exchange wallet via the solana json api. My current process is: send a post request with "method": "getSignaturesForAddress". ...
soltrack's user avatar
0 votes
0 answers
26 views

Solana.py Transfer error not working

Please how do i so solana transfer, the codes seems to be emitting an issue from solana's own api file. def Sol_Transfer(user_number, recipient: str, amount: float): private_key = get_private_key(...
Anthonyslav1's user avatar
1 vote
1 answer
82 views

Problem with calling versioned transactions

Im using this python script to retrieve this version 0 transaction: import requests url = 'http://api.mainnet-beta.solana.com/' headers = {'Content-Type': 'application/json'} payload = { "...
sup no's user avatar
  • 11
0 votes
1 answer
34 views

Error: solders.SignerError: not enough signers

I am trying to buy a token through solana.ру, but in the process of writing the code, I get an error from solana.rpc.api import Client, Keypair, Pubkey from spl.token.constants import TOKEN_PROGRAM_ID ...
AREW's user avatar
  • 33
0 votes
0 answers
23 views

How Can I Ensure Reliable SPL Token Transfers in Python and Address Intermittent Failures by Adding a Priority Fee? [duplicate]

I'm trying to implment spl token transfer in TG bot in python, but the transfer is failing from time to time with quite delay, I guess I could put priority fee to improve the situation, but cannot ...
cablespecific's user avatar
0 votes
1 answer
35 views

Unable to Retrieve Data Using get_program_account with SPL Token Program (Python)

I'm developing a script to track newly created tokens on the Solana network. However, I'm encountering an issue when attempting to retrieve data using client.get_program_account. Despite my efforts, I'...
Nerevaine's user avatar
  • 159
0 votes
1 answer
292 views

Sending a single transaction through Jito using Python

Is it possible to send single transactions through Jito (and including a tip) using Python? If yes, any ideas on how it can be done and how should the tip be included in the instructions of the ...
TheLastSamurai's user avatar
1 vote
1 answer
159 views

expected a sequence of length 32 (got 43) error when using solana in Python

Solana community! I'm working on a Python script to filter transactions executed through the SPL Token Program. I aim to specifically identify and list new token creation transactions. However, I'm ...
Nerevaine's user avatar
  • 159
0 votes
2 answers
142 views

Adding Instruction to Compiled instruction in Python

I'm working with python and have a versioned transaction where the instructions are compiled. To that versioned transaction I need to add a NON compiled instruction somehow. If the transaction is ...
Milan's user avatar
  • 1
0 votes
1 answer
18 views

Incorrect lamports calulaction

I'm new to Solana development, I want to get my wallet balance, which is 5 sol. When I do client = AsyncClient("https://api.devnet.solana.com") res = await client.get_balance(...
DYAK's user avatar
  • 1
0 votes
1 answer
61 views

How to add maxRetries to solana-py send_transaction

I send tx with Python SDK send_transaction function. ctx = Client(RPC_URL, commitment=Commitment("confirmed")) txn = ctx.send_transaction(tx, *signers) I want to add to send tx process ...
Jahspear's user avatar
  • 103
0 votes
1 answer
127 views

Check if coin is registrered on Raydium

What is the most efficient way to check if a Solana coin is listed on DEX in Python? I know it can be done through dexscreener getToken API. However, I don't need any information about the token other ...
Lars Mohammed's user avatar
0 votes
0 answers
73 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
147 views

Getting Transaction details by Transaction Hash Python

I'm working on a script to update a DB when a transaction with a specific memo is sent to a specific address. I am able to get confirmed transaction hashes for the address, but I am struggling to find ...
SolanaPython's user avatar
0 votes
1 answer
211 views

Error getting token price using Jupiter API in Python

I am trying to fetch the price of a token across multiple decentralized exchanges (DEXs) on the Solana blockchain using the Jupiter API in Python. However, I am encountering the following error: I ...
Alexander Paul's user avatar
0 votes
1 answer
121 views

Using recent blockhash with Python

How can I add the getLatestblockhash function in to this code. I tried it but I got: TypeError: argument 'blockhash': 'GetLatestBlockhashResp' object cannot be converted to 'Hash' from spl.token....
Uğur Demirezen's user avatar
0 votes
0 answers
72 views

How to add instruction to VersionedTransaction

I have the following: raw_tx = VersionedTransaction.from_bytes(b64decode(transaction_data)) signature = keypair.sign_message(to_bytes_versioned(raw_tx.message)) signed_tx = VersionedTransaction....
Nicolas Rey's user avatar
0 votes
1 answer
268 views

How can I send multiple transactions simultaneously in Python?

I am currently in a situation where I need to send multiple transactions simultaneously. I see that it is possible as some accounts can send 10 or even more transactions per second, and their ...
xallve's user avatar
  • 17
0 votes
1 answer
131 views

How to Efficiently Retrieve the Oldest Transaction Signature for a Solana Address with Billions of Transactions

I'm working on a project where I need to retrieve the oldest transaction signature for a given Solana address. However, I'm facing a challenge when dealing with addresses that have billions of ...
Syntax Surge's user avatar
1 vote
1 answer
296 views

Transaction Signature Received But Tx never found

I've been working with the Python Solana SDK to send transactions to the Solana Mainnet Beta Cluster. For endpoint connections, I've tried both QuickNode and Alchemy. Despite the SDK returning a ...
Muhammad Yasir Azeem's user avatar
1 vote
0 answers
65 views

How do I sign a transaction in Python?

If I have a transaction like the one below (encoded in base64), how do I go about signing it using python? ...
Mohamed Hossam El-Maabady's user avatar
1 vote
2 answers
2k 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
1 vote
0 answers
52 views

Mint NFT using python

currently i am using django as a backend system for my application. I want to create a function to mint the NFT. I have gone through various libraires but couldn't get much idea.
Shubham Jaiswal's user avatar
0 votes
1 answer
564 views

Best Anti-Mev method?

I am currently working on a project which involves swapping token (raydium / jupiter) and I just wanted to know if there is any reliable methods for anti-mev, such that I can prevent sandwich attacks, ...
sashavsthewrld's user avatar
1 vote
2 answers
412 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
0 votes
0 answers
47 views

Keep failing minting NFT with Candy Machine V2

We use Python to mint NFTs. python solana. Our last minting was in January 2023, but when we tried to mint again now, we confirmed in solscan that mpl was failing. Program returned error: custom ...
ssssoooooo's user avatar
2 votes
1 answer
87 views

Adding Solana to Edinburgh Decentralization Index

I'm an independent crypto guy working on trying to improve and expand the Edinburgh Decentralization Index (EDI) that recently relased its alpha version: http://blockchainlab.inf.ed.ac.uk/edi-...
Cerkoryn's user avatar
1 vote
0 answers
101 views

Error: Transfering SPL Tokens via Python

I have been transferring my SPL Tokens via python for 2 months and there is no problem. With the same code, nothing has changed. When I did the transfer I got a signature and when I check this ...
Uğur Demirezen's user avatar
0 votes
2 answers
375 views

"No data" after sending tx [Python]

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
1k 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