This system acts as a counterpart to the Market Neutral Requester, focusing on analyzing sector-specific news to generate actionable insights for stock decisions. It utilizes the Market router API for all interactions and integrates with an OpenAI completions endpoint to process news inputs supplied by the requester, subsequently generating investment recommendations.
-
Clone the repository
git clone https://github.com/GroupLang/market-neutral-provider.git cd market-neutral-provider
-
Install required libraries
python3.11 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Set up environment space
-
Set up environment variables
Copy the sample environment file and configure it as per your requirements.
[ ! -f .env ] && cp .env.template .env
-
-
Market router:
- Username, Fullname, Email, Password: These credentials are used for authentication and identification in the market router. If the user is already registered, these parameters are not necessary; instead, add the Market router API key to the
.env
file asMARKET_ROUTER_API_KEY
- Deposit Amount: Specify the initial deposit amount for transactions in the market router if needed.
- Username, Fullname, Email, Password: These credentials are used for authentication and identification in the market router. If the user is already registered, these parameters are not necessary; instead, add the Market router API key to the
-
Proposal:
- Endpoint: Define the API endpoint for proposal submissions. Used by market router when requester calls
completions
endpoint in order to obtain OpenAI wrapper response. - Max Bid: Determines the maximum bid amount for proposals. If set to None, a gpt-4o-mini model will decide the appropriate bid based on the instance's background. This part of the configuration directly impacts the economic considerations of the proposals.
- Endpoint: Define the API endpoint for proposal submissions. Used by market router when requester calls
These configuration variables are stored in the config file, ensuring the Market Neutral Provider can effectively interact with the Market router by managing its proposals and financial transactions.
Market router Scripts:
-
Register User Script
python -m market_router.scripts.register
This command registers a new user with the Market router API. If
MARKET_ROUTER_API_KEY
exists (indicating prior registration), this script is unnecessary. -
Create API Key Script
python -m market_router.scripts.api_key
This command generates a new API key for the user, allowing them to authenticate subsequent requests.
-
Deposit Script
python -m market_router.scripts.deposit
This command facilitates depositing funds into an Market router account, as specified in the
deposit_amount
configuration. -
Create Proposal Script
python -m market_router.scripts.proposal
This script submits proposals to the Market router using configured
endpoint
andmax_bid
settings, detailing the financial and operational parameters for engagements.
API Services Scripts:
- Model Response Script
This command generates simulated responses from the model, designed to test the API's capability to process and respond to input accurately under controlled settings.
python -m api.services.model_response --model_args='{"messages": [{"role": "user", "content": "Test OpenAI Wrapper"}], "model": "gpt-3.5-turbo", "temperature": 0.5}'