공식 SDK 라이브러리

Python, JavaScript, Go, Rust용 공식 클라이언트 라이브러리. 타입 지정 클라이언트, 자동 재시도 로직, WebSocket 지원으로 API 통합을 간소화합니다.

Python SDK

패키지: smartmoney-api

설치: pip install smartmoney-api

저장소: github.com/smartmoneyapi/python-client

Python
from smartmoney import SmartMoneyAPI # 클라이언트 초기화 client = SmartMoneyAPI(api_key="sk_live_abc123xyz789") # 고래 포지션 조회 whales = client.whale_positions(symbol="BTCUSDT", limit=50) for position in whales: print(f"{position.wallet_address}: {position.position_size} BTC @ {position.entry_price}") # 펀딩 레이트 조회 funding = client.funding_rates(symbol="BTCUSDT", interval="4h", limit=24) # 실시간 업데이트 스트리밍 with client.stream_whale_positions(["BTCUSDT", "ETHUSDT"]) as stream: for update in stream: print(f"포지션 업데이트: {update}")

기능

  • Async/await 지원 (asyncio, aiohttp)
  • 지수 백오프 자동 재시도
  • 자동 재연결 WebSocket 스트리밍
  • 타입 힌트 및 IDE 자동완성
  • 요청 로깅 및 디버깅

JavaScript SDK

패키지: smartmoney-api

설치: npm install smartmoney-api

저장소: github.com/smartmoneyapi/js-client

JavaScript
import { SmartMoneyAPI } from "smartmoney-api"; const client = new SmartMoneyAPI({ apiKey: "sk_live_abc123xyz789" }); // 고래 포지션 조회 const whales = await client.whalePositions({ symbol: "BTCUSDT", limit: 50 }); whales.positions.forEach(pos => { console.log(`${pos.wallet_address}: ${pos.position_size} BTC`); }); // 실시간 업데이트 스트리밍 const stream = client.streamWhalePositions(["BTCUSDT", "ETHUSDT"]); stream.on("data", (update) => { console.log("포지션 업데이트:", update); }); stream.on("error", (err) => { console.error("스트림 오류:", err); });

Go SDK

모듈: github.com/smartmoneyapi/go-client

설치: go get github.com/smartmoneyapi/go-client

Go
package main import ( "fmt" "github.com/smartmoneyapi/go-client" ) func main() { // 클라이언트 생성 client := smartmoney.NewClient("sk_live_abc123xyz789") // 고래 포지션 조회 positions, err := client.WhalePositions(ctx, &smartmoney.WhalePositionsFilter{ Symbol: "BTCUSDT", Limit: 50, }) if err != nil { panic(err) } for _, pos := range positions { fmt.Printf("%s: %.2f BTC\n", pos.WalletAddress, pos.PositionSize) } }

Rust SDK

크레이트: smartmoney-api

설치: cargo add smartmoney-api

Rust
use smartmoney_api::Client; #[tokio::main] async fn main() -> Result<(), Box> { let client = Client::new("sk_live_abc123xyz789"); // 고래 포지션 조회 let positions = client .whale_positions() .symbol("BTCUSDT") .limit(50) .send() .await?; for position in positions.iter() { println!( "{}: {} BTC @ {}", position.wallet_address, position.position_size, position.entry_price ); } Ok(()) }

일반적인 패턴

오류 처리

모든 SDK는 자동 재시도 로직이 포함된 풍부한 오류 유형을 제공합니다. 오류에는 상태 코드, 오류 코드, 사람이 읽을 수 있는 메시지가 포함됩니다.

요청 시간 초과

구성 가능한 요청 시간 초과(기본값 30초). 장기 실행 작업에 대한 사용자 지정 시간 초과 설정 가능.

속도 제한 처리

속도 제한에 도달할 경우 지수 백오프 자동 적용. Retry-After 헤더를 존중합니다.

원하는 SDK 선택

선호하는 언어로 시작하세요. 전체 문서와 예제가 포함되어 있습니다.

API 참조 보기
무료 시작 — 하루 100회 호출, 카드 불필요

하나의 API로 3개 거래소의 실시간 고래 흐름, 펀딩, 미체결약정 및 온체인 데이터를 얻으세요. 무료 티어, 신용카드 불필요, 언제든지 업그레이드 가능.

무료로 시작 →
실시간 API 콘솔 체험 → (계정 불필요)
30초 내 API 키 발급

빌드 준비 완료? 무료 API 키(하루 100회 호출, 카드 불필요)를 받아 실시간 고래, 펀딩 및 온체인 데이터를 가져오세요.

API 키 받기 →