henrytirla / decentralized-exchange-trading-scripts Goto Github PK
View Code? Open in Web Editor NEWUseful scripts to automate trading on different DEX
Home Page: https://www.dextradingscript.com/
License: MIT License
Useful scripts to automate trading on different DEX
Home Page: https://www.dextradingscript.com/
License: MIT License
How to trade Solana’s tokens? The tokens issued on the pump.fun website are not in the raydium pool. How can I trade them through code?
Hi, A very very good jobs !!
I have some wonder about you pull pool keys via fetch_pool_keys, some times. it need to get this info from https://api.raydium.io/v2/sdk/liquidity/mainnet.json.
when you detect a new pool. can get this info from def process_messages
in ?, make it more faster ?
Thank you very much for your code. I'm using the raydium swap and works great, there's a way to adjust the fee to get priority in the transaction? sorry for my english.
EDIT: i did it, just need to add this line in buy/sell functions:
just edit:
from solders.compute_budget import set_compute_unit_price # import this
then:
if swap_token_account_Instructions is not None:
swap_tx.add(swap_token_account_Instructions)
swap_tx.add(set_compute_unit_price(1_0000)) # Add this line, edit amount with your custom fee
swap_tx.add(instructions_swap)
swap_tx.add(closeAcc)
Great script Henry. How do you extract and print token address? Thanks.
I get this error when trying to running Solana/Trade/sell_swap.py. How to fix this?
`Traceback (most recent call last):
File "/Users/anon/Desktop/LOB-bot/Solana/solana_script.py", line 106, in sell
txn = solana_client.send_transaction(swap_tx, *signers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/freqtrade/lib/python3.11/site-packages/solana/rpc/api.py", line 1059, in send_transaction
txn_resp = self.send_raw_transaction(txn.serialize(), opts=opts_to_use)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/freqtrade/lib/python3.11/site-packages/solana/rpc/api.py", line 993, in send_raw_transaction
resp = self._provider.make_request(body, SendTransactionResp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/freqtrade/lib/python3.11/site-packages/solana/exceptions.py", line 43, in argument_decorator
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/freqtrade/lib/python3.11/site-packages/solana/rpc/providers/http.py", line 49, in make_request
return _parse_raw(raw, parser=parser)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Caskroom/miniforge/base/envs/freqtrade/lib/python3.11/site-packages/solana/rpc/providers/core.py", line 97, in _parse_raw
raise RPCException(parsed)
solana.rpc.core.RPCException: SendTransactionPreflightFailureMessage { message: "Transaction simulation failed: Blockhash not found", data: RpcSimulateTransactionResult(RpcSimulateTransactionResult { err: Some(BlockhashNotFound), logs: Some([]), accounts: None, units_consumed: Some(0), return_data: None, inner_instructions: None }) }
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/anon/Desktop/LOB-bot/Solana/solana_script.py", line 162, in <module>
sell(solana_client,token_toSell,payer, amount_to_sell)
File "/Users/anon/Desktop/LOB-bot/Solana/solana_script.py", line 145, in sell
time.sleep(60)
KeyboardInterrupt`
Versions:
solana 0.34.0
solders 0.21.0
python 3.11.7
Ive been running this over several days and it doesnt appear to capture all new pools.
An example today LP pair 5X4XmtsQguE6jmHXHwvWYwm4HdRYLureUYUw4VXmTb3Y which is a new token GnZmtv9eJFgxcVmKCT3HanANnPgBpjmfiGK6VpwDy4S
it didnt come though.
Im seeing multiple of these a day, is there another log instruction I should be looking for?
Hello,
I was going through you CopyTrade-IrrespectiveOfRouter.py . I am unable to understand what is this hash
if logs['address'] == WETH and alchemy.to_hex(logs['topics'][0]) == "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef":
also this hash
elif logs['address'] != WETH:
if alchemy.to_hex(
logs['topics'][0]) == "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925":
can you help me out a bit over here?
It would be great if you could add some documentation to explain how to launch the project and how to use it too.
Can you update the buy and sell order source code on solana?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.