Example Python code for running the mango-explorer marketmaker

Overview

🥭 Mango Explorer

📖 Introduction

This guide will show you how to load and run a customisable marketmaker that runs on Mango Markets using the mango-explorer library.

There are plenty of ways to do this. This document shows only one possible approach.

🪜 Prerequisites

  1. Installation and Dependencies - shows you how to set up a Python virtual environment and pip install mango-explorer. (Optional - feel free to skip if you're comfortable doing this on your own.)
  2. Devnet Wallet Creation - shows you how to create a Solana Keypair file and prepare it for devnet with some devnet SOL and devnet USDC. (Optional - feel free to skip if you're comfortable doing this on your own.)
  3. Devnet Mango Account Creation - shows you how to create a Mango Account on devnet and deposit devnet USDC into it. (Optional - feel free to skip if you're comfortable doing this on your own.)
  4. Code Walkthrough - takes you through the code in marketmaker.py line by line. (Optional - feel free to skip if you're comfortable doing this on your own.)

🏃 Running the Marketmaker

That's a lot of setup to get you to this stage but some of it was skippable if you already had a Python venv, Solana wallet and a Mango Account. And if you didn't, you do now!

You can now start the marketmaker by running:

python marketmaker.py

No parameters are required - all the parameters and options for running the marketmaker are in the code.

When you run it you should see a lot of output, with large 'pulses' of output every 10 seconds or so. (You can tweak the volume of logging and the pulse interval in the code.)

🛵 Next Steps

If you've got this far, congratulations! You're now running a marketmaker on devnet.

Things you can do now:

  • experiment with different parameters to see how that changes the orders.
  • experiment with different Elements to filter orders or bias prices or quantities in certain circumstances. (Want to shift the prices in your orders if you've built up too much inventory? Can do!)
  • create your own custom Elements to change order quantities or prices based on new criteria. (Want to widen the spread when volatility is high? Create a custom Element!)

🦮 Support

🥭 Mango Markets support is available at: Docs | Discord | Twitter | Github | Email

Owner
Blockworks Foundation
Blockworks Foundation
Practical Python Programming

Welcome! When I first learned Python nearly 25 years ago, I was immediately struck by how I could productively apply it to all sorts of messy work pro

Dabeaz LLC 8.3k Jan 08, 2023
charcade is a string manipulation library that can animate, color, and bruteforce strings

charcade charcade is a string manipulation library that can animate, color, and bruteforce strings. Features Animating text for CLI applications with

Aaron 8 May 23, 2022
Python code for working with NFL play by play data.

nfl_data_py nfl_data_py is a Python library for interacting with NFL data sourced from nflfastR, nfldata, dynastyprocess, and Draft Scout. Includes im

82 Jan 05, 2023
Poetry plugin to export the dependencies to various formats

Poetry export plugin This package is a plugin that allows the export of locked packages to various formats. Note: For now, only the requirements.txt f

Poetry 90 Jan 05, 2023
Python Deep Dive Course - Accompanying Materials

Python Deep Dive Various Jupyter notebooks and Python sources associated with my Udemy Python 3 Deep Dive course series: Part 1: Mainly functional pro

Fred Baptiste 1.1k Dec 30, 2022
Toolchain for project structure and documents optimisation

ritocco Toolchain for project structure and documents optimisation

Harvey Wu 1 Jan 12, 2022
JTEX is a command line tool (CLI) for rendering LaTeX documents from jinja-style templates.

JTEX JTEX is a command line tool (CLI) for rendering LaTeX documents from jinja-style templates. This package uses Jinja2 as the template engine with

Curvenote 15 Dec 21, 2022
Resource hub for Obsidian resources.

Obsidian Community Vault Welcome! This is an experimental vault that is maintained by the Obsidian community. For best results we recommend downloadin

Obsidian Community 320 Jan 02, 2023
Autolookup GUI Plugin for Plover

Word Tray for Plover Word Tray is a GUI plugin that automatically looks up efficient outlines for words that start with the current input, much like a

Kathy 3 Jun 08, 2022
Python bindings to OpenSlide

OpenSlide Python OpenSlide Python is a Python interface to the OpenSlide library. OpenSlide is a C library that provides a simple interface for readin

OpenSlide 297 Dec 21, 2022
MkDocs plugin for setting revision date from git per markdown file

mkdocs-git-revision-date-plugin MkDocs plugin that displays the last revision date of the current page of the documentation based on Git. The revision

Terry Zhao 48 Jan 06, 2023
A set of Python libraries that assist in calling the SoftLayer API.

SoftLayer API Python Client This library provides a simple Python client to interact with SoftLayer's XML-RPC API. A command-line interface is also in

SoftLayer 155 Sep 20, 2022
SamrSearch - SamrSearch can get user info and group info with MS-SAMR

SamrSearch SamrSearch can get user info and group info with MS-SAMR.like net use

knight 10 Oct 06, 2022
Python 3 wrapper for the Vultr API v2.0

Vultr Python Python wrapper for the Vultr API. https://www.vultr.com https://www.vultr.com/api This is currently a WIP and not complete, but has some

CSSNR 6 Apr 28, 2022
A Python Package To Generate Strong Passwords For You in Your Projects.

shPassGenerator Version 1.0.6 Ready To Use Developed by Shervin Badanara (shervinbdndev) on Github Language and technologies used in This Project Work

Shervin 11 Dec 19, 2022
Showing potential issues with merge strategies

Showing potential issues with merge strategies Context There are two branches in this repo: main and a feature branch feat/inverting-method (not the b

Rubén 2 Dec 20, 2021
Read write method - Read files in various types of formats

一个关于所有格式文件读取的方法 1。 问题描述: 各种各样的文件格式,读写操作非常的麻烦,能够有一种方法,可以整合所有格式的文件,方便用户进行读取和写入。 2

2 Jan 26, 2022
My Sublime Text theme

rsms sublime text theme Install: cd path/to/your/sublime/packages git clone https://github.com/rsms/sublime-theme.git rsms-theme You'll also need the

Rasmus 166 Jan 04, 2023
This is a tool to make easier brawl stars modding using csv manipulation

Brawler Maker : Modding Tool for Brawl Stars This is a tool to make easier brawl stars modding using csv manipulation if you want to support me, just

6 Nov 16, 2022
Proyecto - Desgaste y rendimiento de empleados de IBM HR Analytics

Acceder al código desde Google Colab para poder ver de manera adecuada todas las visualizaciones y poder interactuar con ellas. Links de acceso: Noteb

1 Jan 31, 2022