prod deployment
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Multi-stage build for DexOrder user container
|
||||
# Multi-stage build for Dexorder user container
|
||||
FROM continuumio/miniconda3:latest AS builder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# DexOrder Python Client Library
|
||||
# Dexorder Python Client Library
|
||||
|
||||
High-level Python API for accessing historical OHLC data from the DexOrder trading platform.
|
||||
High-level Python API for accessing historical OHLC data from the Dexorder trading platform.
|
||||
|
||||
## Features
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Example configuration file for DexOrder user container
|
||||
# Example configuration file for Dexorder user container
|
||||
# Mount this at /app/config/config.yaml in k8s
|
||||
|
||||
# Data directory for persistent storage (workspace, strategies, etc.)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
DexOrder Trading Platform Python Client
|
||||
Dexorder Trading Platform Python Client
|
||||
|
||||
Provides high-level APIs for:
|
||||
- Historical OHLC data retrieval with smart caching
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
DexOrder API - market data and charting for research and trading.
|
||||
Dexorder API - market data and charting for research and trading.
|
||||
|
||||
For research scripts, import and use get_api() to access the API:
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Main DexOrder API - provides access to market data and charting.
|
||||
Main Dexorder API - provides access to market data and charting.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
@@ -64,8 +64,10 @@ class ChartingAPI(ABC):
|
||||
)
|
||||
|
||||
# Overlay moving average
|
||||
# NOTE: mplfinance uses integer x-positions (0..N-1) internally,
|
||||
# so overlays must use range(len(df)), not df.index.
|
||||
fig, ax = api.plot_ohlc(df)
|
||||
ax.plot(df.index, df['sma_20'], label="SMA 20", color="blue")
|
||||
ax.plot(range(len(df)), df['sma_20'], label="SMA 20", color="blue")
|
||||
ax.legend()
|
||||
"""
|
||||
pass
|
||||
|
||||
@@ -134,16 +134,11 @@ class ChartingAPIImpl(ChartingAPI):
|
||||
new_ax.sharex(existing_axes[0])
|
||||
|
||||
# Plot the indicator data
|
||||
# mplfinance uses integer x-positions (0..N-1) internally, so we must
|
||||
# use range(len(df)) to align with the candlestick axes.
|
||||
for col in columns:
|
||||
if col in df.columns:
|
||||
# Handle potential timestamp index (convert from microseconds)
|
||||
if df.index.name == 'timestamp' or 'timestamp' in str(df.index.dtype):
|
||||
# Assume nanoseconds, convert to datetime
|
||||
plot_index = pd.to_datetime(df.index, unit='ns')
|
||||
else:
|
||||
plot_index = df.index
|
||||
|
||||
new_ax.plot(plot_index, df[col], label=col, **kwargs)
|
||||
new_ax.plot(range(len(df)), df[col], label=col, **kwargs)
|
||||
|
||||
# Styling
|
||||
if ylabel:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
DexOrder User Container Main Entry Point
|
||||
Dexorder User Container Main Entry Point
|
||||
|
||||
Brings together:
|
||||
- Config and secrets loading from k8s mounted YAML files
|
||||
@@ -181,7 +181,7 @@ def create_mcp_server(config: Config, event_publisher: EventPublisher) -> Server
|
||||
return {
|
||||
"uri": uri,
|
||||
"mimeType": "text/plain",
|
||||
"text": f"Hello from DexOrder user container!\nUser ID: {config.user_id}\n",
|
||||
"text": f"Hello from Dexorder user container!\nUser ID: {config.user_id}\n",
|
||||
}
|
||||
else:
|
||||
raise ValueError(f"Unknown resource: {uri}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Example secrets file for DexOrder user container
|
||||
# Example secrets file for Dexorder user container
|
||||
# Mount this at /app/config/secrets.yaml in k8s
|
||||
# This file should be created from k8s secrets
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
|
||||
setup(
|
||||
name="dexorder-sandbox",
|
||||
version="0.1.0",
|
||||
description="DexOrder Trading Platform Sandbox",
|
||||
description="Dexorder Trading Platform Sandbox",
|
||||
packages=find_packages(),
|
||||
python_requires=">=3.9",
|
||||
install_requires=[
|
||||
|
||||
Reference in New Issue
Block a user