Skip to main content

Questions tagged [solana.py]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
1 answer
31 views

Fields meaning in RPC methods with websocket (accountSubscribe)

I'm experimenting with the RPC methods using websockets from solana.py. I didn't find a documentation describing precisely all fields in reply. As an example, AccountSubscribe methods should give the ...
microchip's user avatar
1 vote
1 answer
55 views

How to subscribe efficiently to multiple account using websockets

I would like to subscribe to multiple accounts using websockets. The example provided by the documentation show only the subscription to a log (which is fine) but with only one account. Basically, I ...
microchip's user avatar
2 votes
0 answers
36 views

What function should I use to purchase a token transfer with program_id?

I am trying to repeat this transaction (4Ku7oqwPAwRLPm7jNp2oTigYv8XpcTPLJwF49dLVS6ypi35vH9orwRAPcfMj37jj8FwmpMFuP5j8cS1hwdoXJp67) programmatically on solana or solana cli (I will be grateful for any ...
AREW's user avatar
  • 33
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
0 votes
1 answer
36 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
1 vote
0 answers
53 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
4 votes
1 answer
552 views

How do I derive the public key from a seedphrase using Python

I'm trying to write a Python script to derive a public key from a Seed Phrase using Python. My current code is the following. def generate_solana_address_from_seed(seed_phrase): seed_phrase_str = '...
Francisco Peixoto's user avatar
3 votes
2 answers
1k views

How to use custom priority fee when sending solana transactions using solana.py

This is my current code. CODE: from solana.rpc.api import Client from solana.keypair import Keypair from solana.transaction import Transaction from solana.system_program import TransferParams, ...
aste123's user avatar
  • 171
1 vote
0 answers
227 views

How to send a transaction with custom data to a Solana program in Python

I'm new to solana development, and I've been reading docs all morning and I can't seem to find a way to send a transaction to a program with custom data. I tried using TransactionInstruction but it ...
flray's user avatar
  • 11
2 votes
3 answers
3k views

Transfer Solana using Solders for Python

I am still new to this and have been trying to figure this out for some time now so any help you can offer would really be greatly appreciated. I see quite a bit of literature and tutorials on how to ...
Ryan Thomas's user avatar
2 votes
1 answer
738 views

finding all token addresses in a wallet

im using python and the RPC API, which based on my research only has the GPA (get program accounts) in terms of getting a list of owned tokens. how can i do this without using GPA due to its various ...
Morgandril's user avatar
0 votes
1 answer
81 views

Transferring custom made solana tokens (not owned by me) from one wallet to another

So I am working on a script that transfers tokens (custom-made tokens not owned by me) from one wallet to another in python. How do I go about doing that? (By tokens I mean, tokens like Dust, Luv, etc....
Rudra Lakhani's user avatar
0 votes
1 answer
359 views

skip_confirmation returning TXID

I'm using a Python library solana-py to send Solana transactions. My question is, if I use skip_confirmation=False in TxOpts for the opts for the transaction, if the tx fails, will the ...
Maxisy's user avatar
  • 43
0 votes
2 answers
916 views

How to get the last 'n' transactions in solana.py?

I am currently working on a Shop based which accepts Solana as the form of currency, I want to know the details of last n transactions on my wallet. How can I do that?
code-wolf-byte's user avatar
1 vote
0 answers
55 views

How to use Magic Eden instruction endpoints and turn them into transactions in solana-py

I want to start interacting with Magic Eden NFTs through my solana-py code. So I want to learn how to use the endpoints at https://api.magiceden.dev/#82874536-9430-4dae-81dc-1235baaa3ef3. I have an ...
Pixeled's user avatar
  • 476
4 votes
1 answer
174 views

How do I track transactions on my wallet?

I am currently working on a Shop based which accepts Solana as the form of currency, I want to know which wallets are transferring funds to my wallet. How can I do that?
code-wolf-byte's user avatar
4 votes
2 answers
122 views

Is there a way to edit NFT metadata in python?

I've been using solana-py in python to interact with Solana for a bit now. And I've been wondering if there's a way to update NFT metadata in python. I'd assume you can't do it on solana-py. So I was ...
Pixeled's user avatar
  • 476
4 votes
1 answer
180 views

How to use an already existing wallet on the network?

I am trying to transfer some funds using my private key in Python. Here's the code but I don't know how I can use my existing phantom wallet's secret key to make the transaction. Here's the code, can ...
code-wolf-byte's user avatar
0 votes
1 answer
2k views

How to create a Keypair json in solana.py?

I'm attempting to create a keypair json I can save to my directory in solana.py that I can use on a local Solana test validator. Unsure if there's any built-in functions within solana.py to do so, I ...
Steven Cloud's user avatar
1 vote
2 answers
1k views

How to send solana using using python?

a bit new to the Solana development, I am trying to create a program that can send a certain amount of Solana from my wallet to a particular address. I found some code but am not really understanding ...
code-wolf-byte's user avatar