원클릭으로
add-exchange
Scaffolds a new exchange connector with connector, provider, and trait implementations. Use when integrating a new exchange.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Scaffolds a new exchange connector with connector, provider, and trait implementations. Use when integrating a new exchange.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | add-exchange |
| description | Scaffolds a new exchange connector with connector, provider, and trait implementations. Use when integrating a new exchange. |
| disable-model-invocation | true |
| user-invocable | true |
| argument-hint | <거래소명_snake_case> [시장유형: kr|us|crypto|global] |
| allowed-tools | Read, Grep, Edit, Write, Bash(cargo *) |
| context | fork |
| agent | rust-impl |
새 거래소 $ARGUMENTS[0]을 추가합니다.
# 가장 유사한 기존 거래소 확인
ls crates/trader-exchange/src/connector/
ls crates/trader-exchange/src/provider/
추천 참조: upbit/ (가장 간결한 구조)
위치: crates/trader-exchange/src/connector/$ARGUMENTS[0]/
connector/$ARGUMENTS[0]/
├── mod.rs # pub 모듈 선언
├── client.rs # HTTP 클라이언트 (REST API 호출)
├── models.rs # API 요청/응답 타입
└── websocket.rs # WebSocket 스트림 (선택)
pub struct ExchangeClient {
base_url: String,
client: reqwest::Client,
}
impl ExchangeClient {
// 시세 조회
pub async fn get_ticker(&self, symbol: &str) -> Result<TickerResponse>;
pub async fn get_orderbook(&self, symbol: &str) -> Result<OrderbookResponse>;
pub async fn get_candles(&self, symbol: &str, interval: &str) -> Result<Vec<CandleResponse>>;
// 주문 (인증 필요)
pub async fn place_order(&self, order: &OrderRequest) -> Result<OrderResponse>;
pub async fn cancel_order(&self, order_id: &str) -> Result<()>;
pub async fn get_balance(&self) -> Result<BalanceResponse>;
}
Decimal (API의 f64/String 응답 즉시 변환)circuit_breaker.rs, retry.rs 활용)ExchangeError 사용위치: crates/trader-exchange/src/provider/$ARGUMENTS[0].rs
use crate::traits::{ExchangeProvider, OrderExecutionProvider};
pub struct ExchangeProviderImpl { /* ... */ }
impl ExchangeProvider for ExchangeProviderImpl {
async fn get_ticker(&self, symbol: &str) -> Result<Ticker>;
async fn get_orderbook(&self, symbol: &str) -> Result<Orderbook>;
// ...
}
impl OrderExecutionProvider for ExchangeProviderImpl {
async fn place_order(&self, order: OrderRequest) -> Result<OrderResult>;
async fn cancel_order(&self, order_id: &str) -> Result<()>;
async fn get_balance(&self) -> Result<Balance>;
}
crates/trader-exchange/src/connector/mod.rs — pub mod $ARGUMENTS[0];crates/trader-exchange/src/provider/mod.rs — pub mod $ARGUMENTS[0];crates/trader-exchange/src/lib.rs — 팩토리 함수에 match 분기 추가MarketStream trait 구현:
impl MarketStream for ExchangeStream {
async fn subscribe_ticker(&mut self, symbols: &[String]) -> Result<()>;
async fn subscribe_orderbook(&mut self, symbols: &[String]) -> Result<()>;
}
위치: docs/exchange/$ARGUMENTS[0]_openapi_spec.md
/crawl-api-spec스킬로 자동 생성 가능
cargo check -p trader-exchange
cargo clippy -p trader-exchange -- -D warnings
cargo test -p trader-exchange -- $ARGUMENTS[0]
Generates numbered SQL migration files for tables, indexes, and views. Use when adding or modifying database schema.
Crawls exchange API documentation and generates structured markdown specs. Use when integrating a new exchange or updating API specifications.
Systematically diagnoses build, runtime, DB, API, and frontend errors with classification and fix workflow. Use when encountering errors or test failures.
Commits code changes with automated CHANGELOG and design document updates. Runs build/lint verification before commit. Use after completing a feature, bug fix, or refactoring.
Scaffolds a new API endpoint with router, handler, OpenAPI docs, and TS bindings. Use when adding REST endpoints to trader-api.
Adds a new trading strategy across 5 locations (mod.rs, routes, backtest, SDUI schema, frontend). Use when implementing a new strategy.