API 3Commas

3Commas

 

지원되는 API

 

WebSockets API

websocket 피드는 Trades 및 Deals에 대한 실시간 시장 데이터 업데이트를 제공합니다

 

다음 Public 채널을 구독할 수 있습니다:

 

메서드 Arguments 설명
SubscribeSmartTrades    
SubscribeDeals    

 

이 채널들은 3Commas 서버에 대한 인증이 필요합니다. 따라서 먼저 3Commas 계정에서 API 키를 요청한 다음 구성 요소의 ThreeComas 속성에 값을 설정하십시오:

 

 

구독이 성공하면 OnThreeCommasConfirmSubscription 이벤트가 호출됩니다. 그렇지 않으면 OnThreeCommasRejectSubscription 이벤트가 호출되며, aRawMessage 매개변수를 사용하여 거부 사유를 얻을 수 있습니다.

 

REST API

Test Connectivity

메서드 Arguments 설명
GetPing    
GetServerTime   서버 시간을 반환합니다

 

Account

메서드 Arguments 설명
GetAccounts   사용자 연결된 거래소 목록
GetMarketList   지원되는 시장 목록
GetMarketPairs aMarketCode: 마켓의 코드 모든 시장 쌍
GetCurrencyRatesWithLeverageData aMarketCode: 시장의 코드 aPair: pair 이름 레버리지 데이터가 포함된 통화 환율 및 제한
GetCurrencyRates aMarketCode: 시장의 코드 aPair: pair 이름 통화 요율 및 한도
GetBalances aAccountId: 계정의 id 지정된 거래소에 대한 로드 밸런싱
GetAccountTableData aAccountId: 계정의 id 지정된 거래소의 모든 사용자 잔액에 대한 정보
GetAccountLeverage aAccountId: 계정의 id aPair: pair 이름 계정 레버리지에 대한 정보
GetAccountInfo aAccountId: 계정의 id Single Account Info

 

 

Smart Trades

메서드 Arguments 설명
GetSmartTradeHistory   거래 내역 가져오기
PlaceMarketOrder aAccountId: 계정의 id aOrderSide: 매수 또는 매도 aPair: 페어 이름 aQuantity: 수량 Market Order를 배치합니다
PlaceLimitOrder aAccountId: 계정의 id aOrderSide: 매수 또는 매도 aPair: 쌍 이름 aQuantity: 수량 aPrice: limit 가격 지정가 주문을 넣습니다
GetSmartTrade aId: 거래의 id입니다. 거래의 Id로 Smart Trade를 가져옵니다
CancelSmartTrade aId: 거래의 id입니다. Trade의 Id로 Smart Trade 취소
CloseByMarketSmartTrade aId: 거래의 id입니다.  
EditSmartTrade aId: 거래의 id입니다. 기존 Smart Trade 편집
ForceStartSmartTrade aId: 거래의 id입니다. Smart Trade를 강제로 시작
AddFundsSmartTrade aId: 거래의 id입니다. Smart Trade에 자금 추가
GetSmartTradeTrades aId: 거래의 id입니다. Smart Trade의 거래를 가져옵니다.

 

DCA Bot

메서드 Arguments 설명
CreateDCABot 새 DCA Bot 생성
GetDCABot aId: 봇의 id Id로 DCA Bot 가져오기
GetDCABots 모든 DCA Bot 가져오기
EnableDCABot aId: 봇의 id Enable a DCA Bot
DisableDCABot aId: 봇의 id Disable a DCA Bot
DeleteDCABot aId: 봇의 id DCA Bot 삭제
CancelDCABot aId: 봇의 id DCA Bot 취소
GetDCABotStats Get DCA Bot statistics
GetAvailableStrategyList 사용 가능한 전략 목록을 가져옵니다.
GetBlacklistPairs blacklist 쌍 가져오기
AddBlacklistPairs 블랙리스트 쌍 추가

 

거래(Deals)

메서드 Arguments 설명
GetDeals Get all deals
GetDeal aId: deal의 id Id로 거래 가져오기
UpdateDeal aId: deal의 id 거래 업데이트
CancelDeal aId: deal의 id 거래 취소
CloseAtMarketDeal aId: deal의 id 시장가로 거래 종료

 

Grid Bot

메서드 Arguments 설명
CreateGridBot 새 Grid Bot 생성
GetGridBot aId: 봇의 id Id로 Grid Bot 가져오기
GetGridBots 모든 Grid Bot 가져오기
EnableGridBot aId: 봇의 id Grid Bot 활성화
DisableGridBot aId: 봇의 id Grid Bot 비활성화
DeleteGridBot aId: 봇의 id Grid Bot 삭제

 

Events

OnConnect

 

새 WebSocket 연결이 열릴 때

 

OnDisconnect

 

WebSocket 연결이 닫힐 때

 

OnThreeCommasConnect

 

클라이언트가 3Commas 서버로부터 Welcome 메시지를 수신하면, 연결이 준비되었음을 의미합니다.

 

OnThreeCommasConfirmSubscription

 

클라이언트가 보낸 이전 구독을 확인합니다.

 

OnThreeCommasRejectSubscription

 

3Commas 채널 구독을 시도하는 중 오류가 발생했습니다

 

OnThreeCommasMessage

 

여기서 클라이언트는 구독한 채널과 관련하여 서버가 보낸 데이터를 수신합니다

 

OnThreeCommasPing

 

서버가 클라이언트에 보내는 Ping입니다.

 

OnThreeCommasHTTPException

 

HTTP REST 메서드를 호출하는 동안 오류가 있으면 이 이벤트가 호출됩니다.