Closed teehanming closed 2 years ago
I'm afraid there really isn't enough information here to help you. Can you please let me know either:
Without knowing either of those things, I can't really help. The code will give that stack trace if you try to use a provider that doesn't exist, but until you let me know what you tried I won't know if that's what happened.
I follow the tutorial from: https://github.com/blockworks-foundation/mango-explorer/blob/main/docs/MarketmakingQuickstart.md#11--start-the-marketmaker
command used from: https://github.com/blockworks-foundation/mango-explorer/blob/main/docs/MarketmakingQuickstart.md#11--start-the-marketmaker
Command used: Oracle pyth
mango-explorer marketmaker --name "BTC-PERP Marketmaker" --market BTC-PERP --oracle-provider pyth --confidenceinterval-position-size-ratio 0.1 --minimumcharge-ratio 0 --confidenceinterval-level 2 --confidenceinterval-level 4 --existing-order-tolerance 0.0001 --pulse-interval 30 --order-type POST_ONLY --biasquoteonposition-bias 0.00003 --log-level DEBUG --cluster-name devnet --dry-run
Oracle serum
mango-explorer marketmaker --name "BTC-PERP Marketmaker" --market BTC-PERP --oracle-provider serum --confidenceinterval-position-size-ratio 0.1 --minimumcharge-ratio 0 --confidenceinterval-level 2 --confidenceinterval-level 4 --existing-order-tolerance 0.0001 --pulse-interval 30 --order-type POST_ONLY --biasquoteonposition-bias 0.00003 --log-level DEBUG --cluster-name devnet --dry-run
Oracle for ftx works fine.
Full output:
2022-01-20 09:04:24 โ root
โ WARNING โ
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
๐ฅญ Mango Markets: https://mango.markets
๐ Documentation: https://docs.mango.markets/
๐ฌ Discord: https://discord.gg/67jySBhxrg
๐ฆ Twitter: https://twitter.com/mangomarkets
๐ง Github: https://github.com/blockworks-foundation
๐ง Email: mailto:hello@blockworks.foundation
2022-01-20 09:04:24 ๐ root marketmaker arguments:
--account_address None
--afteraccumulateddepth_adjustment_ticks 1
--afteraccumulateddepth_depth None
--biasquantityonposition_maximum_position None
--biasquantityonposition_target_position None
--biasquote_factor None
--biasquoteonposition_bias [Decimal('0.00003')]
--blockhash_cache_duration None
--chain []
--cluster_name devnet
--cluster_url []
--commitment None
--confidenceinterval_level [Decimal('2'), Decimal('4')]
--confidenceinterval_position_size_ratio 0.1
--dry_run True
--encoding None
--existing_order_tolerance 0.0001
--fixedpositionsize_value None
--fixedspread_value None
--gma_chunk_pause None
--gma_chunk_size None
--group_address None
--group_name None
--hedging_action_threshold 0
--hedging_market None
--hedging_max_chunk_quantity 0
--hedging_max_price_slippage_factor 0.05
--hedging_target_balance None
--id_file id.json
--log_level 10
--log_suppress_timestamp False
--mango_program_address None
--market BTC-PERP
--maximumquantity_remove False
--maximumquantity_size None
--minimumcharge_from_bid_ask False
--minimumcharge_ratio [Decimal('0')]
--minimumquantity_remove False
--minimumquantity_size 1
--name BTC-PERP Marketmaker
--notify_errors []
--oracle_market None
--oracle_provider pyth
--order_type POST_ONLY
--output_format TEXT
--pulse_interval 30
--quotesingleside_side None
--ratios_from_bid_ask False
--ratios_position_size None
--ratios_spread None
--redeem_threshold None
--serum_program_address None
--skip_preflight False
--stale_data_maximum_retries None
--stale_data_pause_before_retry None
--token_data_file /app/data/solana.tokenlist.json
--topofbook_adjustment_ticks 1
--update_mode POLL
2022-01-20 09:04:24 ๐ root Version: ยซ PackageVersion Unknown - '' ยป
2022-01-20 09:04:24 ๐ root ยซ Context 'BTC-PERP Marketmaker':
Cluster Name: devnet
Cluster URLs:
https://mango.devnet.rpcpool.com
Group Name: devnet.2
Group Address: Ec2enZyoC4nGpEfu2sUNAa2nUGJHWxoUWYSEJ2hNTWTA
Mango Program Address: 4skJ85cdxQAFVKbcGgfun8iZPL7BadVYXG3kGEGkufqA
Serum Program Address: DESVgJVGajEgKGXhb6XmqDHGz3VjdgP7rEVESBgxmroY
ยป
2022-01-20 09:04:24 ๐ RPCCaller getAccountInfo() data is from slot: 109031341
2022-01-20 09:04:24 ๐ SlotHolder Only accepting data from slot 109031341 onwards now.
2022-01-20 09:04:25 ๐ RPCCaller getAccountInfo() data is from slot: 109031341
2022-01-20 09:04:25 ๐ RPCCaller getAccountInfo() data is from slot: 109031342
2022-01-20 09:04:25 ๐ SlotHolder Only accepting data from slot 109031342 onwards now.
2022-01-20 09:04:25 ๐ RPCCaller getAccountInfo() data is from slot: 109031342
2022-01-20 09:04:25 โ root Desired orders chain: ยซ Chain of 5 elements:
ยซ ConfidenceIntervalElement POST_ONLY - position size: 0.1, confidence interval levels: 2, 4 ยป
ยซ MinimumChargeElement - minimum charge ratios: [Decimal('0')] ยป
ยซ BiasQuoteOnPositionElement - biases: [Decimal('0.00003')] ยป
ยซ PreventPostOnlyCrossingBookElement ยป
ยซ ๐๐๐๐๐๐๐๐ป๐๐๐๐๐ฃ๐๐ด๐๐๐๐๐๐ ยป
ยป
2022-01-20 09:04:25 ๐ RPCCaller getAccountInfo() data is from slot: 109031342
2022-01-20 09:04:25 ๐ RPCCaller getMultipleAccounts() data is from slot: 109031343
2022-01-20 09:04:25 ๐ SlotHolder Only accepting data from slot 109031343 onwards now.
Traceback (most recent call last):
File "/app/bin/marketmaker", line 154, in <module>
raise Exception(f"Could not find oracle for market {oracle_market.symbol} from provider {args.oracle_provider}.")
Exception: Could not find oracle for market BTC-PERP from provider pyth.
Using serum as oracle came out the same error:
Traceback (most recent call last):
File "/app/bin/marketmaker", line 149, in <module>
oracle_provider: mango.OracleProvider = mango.create_oracle_provider(context, args.oracle_provider)
File "/app/mango/oraclefactory.py", line 45, in create_oracle_provider
raise Exception(f"Unknown oracle provider '{proper_provider_name}'.")
Exception: Unknown oracle provider 'SERUM'.
Excellent info - thanks!
There are a few things going on. 'pyth' should work as an oracle provider, but doesn't on devnet because pyth changed their naming convention for markets. I have a fix for this in the code but it isn't in a release yet (maybe later today?) Pyth on devnet hasn't been too reliable lately anyway - yesterday it was quoting prices ten times higher than reality because one of their data providers had a faulty exponent.
You could try using 'pyth-mainnet' as the oracle provider. That should load pyth prices from mainnet rather than devnet.
'serum' as an oracle provider won't work because it was renamed 'market' and the Quickstart wasn't updated. Sorry about that. 'market' should work.
Apologies.
I see, thank you for the explanation
Already tried with 3 different oracle, result come with same error