bThis is highly alpha code. Do not use it or you will lose all your money. We'd like to thank Little creatures for being the first company to test Mr. Market and for helping with QA.
Mr Market is a CeFi crypto bot and the reference exchange oracle for Hu Fi. Mr Market has three main functions
Install dependencies
make install
If you don't have Postgres installed, run it simply with docker.
make start-server-db
make start
npx playwright install
Unit testing
yarn test:unit
E2E testing
yarn test:e2e
Unit testing
yarn test
This guide will walk you through the process of deploying a server on Railway and an interface on Vercel for our application. By the end of these steps, you will have a fully functional server and interface setup.
First, ensure you have the following environment variables ready. These are crucial for the configuration of the server and interface.
/server/.env
)Variable | Description | Source |
---|---|---|
ADMIN_PASSWORD |
Admin page password | User-defined |
JWT_SECRET |
JWT secret key (32 bit) | User-defined |
COINGECKO_API_KEY |
Coingecko API key | Coingecko |
MIXIN_APP_ID |
Mixin App ID | Mixin Developer Dashboard |
MIXIN_SESSION_ID |
Mixin Session ID | Mixin Developer Dashboard |
MIXIN_SERVER_PUBLIC_KEY |
Mixin Server Public key | Mixin Developer Dashboard |
MIXIN_SESSION_PRIVATE_KEY |
Mixin Session Private key | Mixin Developer Dashboard |
MIXIN_SPEND_PRIVATE_KEY |
Mixin Spend Private key | Mixin Developer Dashboard |
MIXIN_OAUTH_SECRET |
Mixin Oauth Secret | Mixin Developer Dashboard |
/interface/.env
)Variable | Description | Source |
---|---|---|
PUBLIC_BOT_ID |
Mixin App ID | Mixin Developer Dashboard |
PUBLIC_HUFI_SOCKET_URL |
Server deployment URL | Railway Deployment |
PUBLIC_HUFI_BACKEND_URL |
Server deployment URL | Railway Deployment |
Variables starting with MIXIN
are obtained from the Mixin bot keystore, accessible on the Mixin developer dashboard by creating a new bot.
Deploy Server on Railway
Click the below button to start deployment on Railway. Fill in the environment variables as prompted. Note that the Trial Plan
on Railway might not suffice due to memory constraints; consider upgrading if necessary.
Deploy Interface on Vercel
Use the following button to deploy the interface on Vercel. Ensure you fill in the environment variables as required.
If you encounter issues during the deployment, check the following:
This project is licensed under the GNU Affero General Public License - see the LICENSE.md file for details
"Data provided by CoinGecko",