Skip to main content
Glama
tools.py1.01 kB
# run it like PYTHONPATH=. python3 examples/simple_bot1.py import sys import asyncio import os from deriv_api import DerivAPI from deriv_api import APIError from dotenv import load_dotenv load_dotenv() api_token = os.getenv('DERIV_API_TOKEN', '') if not api_token: raise ValueError("DERIV_API_TOKEN environment variable is required") app_id = os.getenv("DERIV_APP_ID", "1089") # Default to app_id 16929 async def get_symbols(): api = DerivAPI(app_id=app_id) response = await api.ping({'ping': 1}) if response['ping']: print(response['ping']) active_symbols = await api.active_symbols({"active_symbols": "brief", "product_type": "basic"}) return active_symbols async def get_balance() -> dict: api = DerivAPI(app_id=app_id) try: # Authorize authorize = await api.authorize(api_token) print(authorize) # Get Balance response = await api.balance() return response['balance'] finally: await api.clear()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raju-deriv/mcp-deriv-api-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server