Rest API
EXX는 효율적으로 exx거래 기능을 앱에 정합시키기 위해 사용자에게 간단하고 강력한 API를 제공했습니다.
사용 과정에서 문제가 발생되면 기술검토 QQ군: 630260653을 연락하십시오. [를 클릭하여 군에 가입하십시오. ]저희가 가장 권위적인 해답을 드리겠습니다.
최신 EXX 시장 마킷 데이터를 획득합니다
인터페이스 | 설명 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
+- https://api.exx.com/data/v1/markets
모든 시장
예시//# Request GET https://api.exx.com/data/v1/markets //# Response { "eos_btc":{ "minAmount":"0.00010", "amountScale":2, "priceScale":6, "maxLevels":0, "isOpen":false }, "etc_hsr":{ "minAmount":"0.001", "amountScale":3, "priceScale":3, "maxLevels":0, "isOpen":true }, ... } 반환값 설명minAmount : 최소 거래 금액 amountScale : 구매자 코인의 소수점 priceScale : 판매자 코인의 소수점 maxLevels : 최대 레버리지 배수,0은 레버리지가 개방되지 않을 것을 표시합니다 isOpen : 개장하시겠습니까? |
|||||||||||
+- https://api.exx.com/data/v1/tickers
모든 마킷
예시//# Request GET https://api.exx.com/data/v1/tickers //# Response { "bts_btc":{ "vol":0.0, "last":0, "sell":0.0, "buy":0.0, "weekRiseRate":0.0, "riseRate":0.0, "high":0.0, "low":0, "monthRiseRate":0.0 }, ... } 반환값 설명vol : 거래량(최근 24시간) last : 최신 거래가 sell : 판매 1 가격 buy : Buy1 price weekRiseRate : 주 등락폭 riseRate : 24시간 등락폭 high : 최고가 low : 최저가 monthRiseRate : 30일 등락폭 |
|||||||||||
+- https://api.exx.com/data/v1/ticker
시장 마킷
예시//# Request GET https://api.exx.com/data/v1/ticker?currency=eth_hsr //# Response { "ticker": { "vol": "1447.851", "last": "30.487000000", "sell": "30.499", "buy": "30.487", "weekRiseRate": -1.17, "riseRate": 9.45, "high": "30.812", "low": "27.855", "monthRiseRate": -0.99 }, "date": "1510383406453" } 반환값 설명vol : 거래량(최근 24시간) last : 최신 거래가 sell : 판매 1 가격 buy : Buy1 price weekRiseRate : 주 등락폭 riseRate : 24시간 등락폭 high : 최고가 low : 최저가 monthRiseRate : 30일 등락폭 요청 파라미터 설명
|
|||||||||||
+- https://api.exx.com/data/v1/depth
시장 깊이
예시//# Request GET https://api.exx.com/data/v1/depth?currency=eth_hsr //# Response { "asks": [ [ "32.831", "0.083" ]... ], "bids": [ [ "30.434", "10.766" ]... ], "timestamp" : 타임스탬프 } 반환값 설명asks : 판매자 심도 bids : 구매자 심도 timestamp : 이번 심도의 타임스탬프 요청 파라미터 설명
|
|||||||||||
+- https://api.exx.com/data/v1/trades
거래 이력
예시//# Request GET https://api.exx.com/data/v1/trades?currency=eth_hsr //# Response [ { "amount" : 0.933, "price" : 31.595, "tid" : 2583932, "type" : "sell", "date" : 2583932, "trade_type" : "ask", }... ] 반환값 설명amount : 거래 수량 price : 거래 가격 tid : 거래 생성 ID type : 거래 유형, buy/sell date : 거래 시간(타임스탬프) trade_type : 오더 유형, ask/bid 요청 파라미터 설명
|
|||||||||||
+- https://api.exx.com/data/v1/klines
获取K线
예시//# Request https://api.exx.com/data/v1/klines?market=eth_btc&type=1min&size=1&assist=cny //# Response { "datas": { "limit": 1, "time": 60, "symbol": "eth_btc", "contractUnit": "ETH", "assistCoin": "btc", "data": [ [ 1529997660000, //时间戳 0.07301, //开盘价 0.07301, //最高价 0.072621, //最低价 0.072621, //收盘价 12.41 //交易量 ] ], "riseRate": 0, "since": 0, "type": "1min", "moneyType": "BTC" }, "isSuc": true, "resMsg": { "message": "SUCCESS", "code": 1000 } } 반환값 설명limit : 条数 time : 1min对应的秒数 symbol : 市场名 contractUnit : 卖币币种的英文简称 assistCoin : 辅助货币的英文简称 data : kline数据 riseRate :汇率 since :시작 시간 type :kline类型 moneyType :买币币种的英文简称 요청 파라미터 설명
|
거래 API
EXX 패스트 거래에 사용합니다
인터페이스 | 설명 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+- https://trade.exx.com/api/order
위탁 주문
예시//# Request GET https://trade.exx.com/api/order?accesskey=accesskey&amount=1.5¤cy=eth_hsr&nonce=현재 시간 밀리초&price=1024&type=buy &signature=암호화 서명 스트링을 요청합니다 //# Response { "code": 100, "message": "操作成功", "id": "13877" } 반환값 설명code : 복귀 코드 message : 제시 메시지 id : 위탁 오더 번호 요청 파라미터 설명(암호화 서명은 파라미터명의 이니셜 순서에 따라 서명하십시오.signature은 서명할 스트링에 가입하지 않아도 됩니다.)
|
|||||||||||||||||
+- https://trade.exx.com/api/cancel
오더 취소
예시//# Request GET https://trade.exx.com/api/cancel?accesskey=your_access_key¤cy=eth_hsr&id=123456789&nonce=현재 시간 밀리초 &signature=암호화 서명 스트링을 요청합니다 //# Response { "code": "100", "message": "操作成功。" } 반환값 설명code : 복귀 코드 message : 제시 메시지 요청 파라미터 설명(암호화 서명은 파라미터명의 이니셜 순서에 따라 서명하십시오.signature은 서명할 스트링에 가입하지 않아도 됩니다.)
|
|||||||||||||||||
+- https://trade.exx.com/api/getOrder
위탁 구매나 판매를 획득합니다
예시//# Request GET https://trade.exx.com/api/getOrder?accesskey=your_access_key¤cy=eth_hsr&id=123456789&nonce=현재 시간 밀리초 &signature=암호화 서명 스트링을 요청합니다 //# Response { "fees": 0, "total_amount": 1, "trade_amount": 0, "price": 31, "currency": “eth_hsr", "id": "13877", "trade_money": 0, "type": "buy", "trade_date": 1509728383300, "status": 0 } 반환값 설명fees : 거래 수수료 total_amount : 오더 총수량 trade_amount : 거래 완료 수량 price : 단가 currency : 거래 시장 id : 위탁 오더 번호 trade_money : 거래 총금액 type: : 오더 유형buy/sell') trade_date : 타임스탬프 status : 오더 상태(0,거래 대기1,취소2,거래 완료3,거래 대기중의 미거래 부분) 요청 파라미터 설명(암호화 서명은 파라미터명의 이니셜 순서에 따라 서명하십시오.signature은 서명할 스트링에 가입하지 않아도 됩니다.)
|
|||||||||||||||||
+- https://trade.exx.com/api/getOpenOrders
여러개의 위탁 구매나 판매를 획득하고 매번 10개의 기록으로 돌아가 달라고 요청합니다
예시//# Request GET https://trade.exx.com/api/getOpenOrders?accesskey=your_access_key¤cy=eth_hsr &nonce=현재 시간 밀리초&pageIndex=1&type=buy&signature=암호화 서명 스트링을 요청합니다 //# Response [ { "fees": 0, "total_amount": 1, "trade_amount": 0, "price": 30, "currency": “eth_hsr", "id": "13878", "trade_money": 0, "type": "buy", "trade_date": 1509728897772, "status": 0 }, { "fees": 0, "total_amount": 1, "trade_amount": 0, "price": 30, "currency": “eth_hsr", "id": "13877", "trade_money": 0, "type": "buy", "trade_date": 1509728383300, "status": 0 } ] 반환값 설명fees : 거래 수수료 total_amount : 오더 총수량 trade_amount : 거래 완료 수량 price : 단가 currency : 거래 시장 id : 위탁 오더 번호 trade_money : 거래 총금액 type: : 오더 유형 buy/sell trade_date : 타임스탬프 status : 오더 상태(0,거래 대기1,취소2,거래 완료3,거래 대기중의 미거래 부분) 요청 파라미터 설명(암호화 서명은 파라미터명의 이니셜 순서에 따라 서명하십시오.signature은 서명할 스트링에 가입하지 않아도 됩니다.)
|
|||||||||||||||||
+- https://trade.exx.com/api/getBalance
사용자 정보 획득
예시//# Request GET https://trade.exx.com/api/getBalance?accesskey=your_access_key&nonce=현재 시간 밀리초&signature=암호화 서명 스트링을 요청합니다 //# Response { "credits": [ { "flatRatio": "0.1", "userRatio": "0.0985", "noticeRatio": "0.2", "levels": 10, "flatPrice": 11.01471399 } ], "funds": { "BTS": { "total": "10", "freeze": "0", "balance": "10", "propTag": "BTS", "credit_quota": "121.938066", "credit_borrowed": "0", "credit_interest": "0" }, "MONA": { "total": "0.966033", "freeze": "0.966033", "balance": "0", "propTag": "MONA", "credit_quota": "0", "credit_borrowed": "0", "credit_interest": "0" }, .... "ETH": { "total": "10", "freeze": "0", "balance": "10", "propTag": "ETH", "credit_quota": "121.938066", "credit_borrowed": "0", "credit_interest": "0" }, "LTC": { "total": "0", "freeze": "0", "balance": "0", "propTag": "LTC", "credit_quota": "121.938066", "credit_borrowed": "0", "credit_interest": "0" }, "QTUM": { "total": "0.003", "freeze": "0.003", "balance": "0", "propTag": "QTUM", "credit_quota": "0", "credit_borrowed": "9.65", "credit_interest": "0.026252" } } } 반환값 설명credits 대출 정보: flatRatio : 청산 리스크 비율,사용자의 리스크 계수가 이 비율보다 낮을 경우에 시스템은 청산 작업을 진행합니다 userRatio : 청산 비율,사용자 리스크 계수 noticeRatio : 비율 재지정, levels : 레버리지 배수, flatPrice : 청산 가격 funds(자산 정보) : ETH(ETH자산 상세 정보): { total : 코인 총수량, freeze : 동결 수량, balance : 사용 가능할 자산, propTag : 코인 표지, credit_quota : 대출 한도, credit_borrowed : 사용된 한도, credit_interest : 미지불 이자 } ... QTUM(QTUM자산 상세 정보): { total : 코인 총수량, freeze : 동결 수량, balance : 사용 가능할 자산, propTag : 코인 표지, credit_quota : 대출 한도, credit_borrowed : 사용된 한도, credit_interest : 미지불 이자 } |
|||||||||||||||||
+- https://trade.exx.com/api/getChargeAddress
충전 어드레스 획득합니다
예시//# Request GET https://trade.exx.com/api/getChargeAddress?accesskey=your_access_key¤cy=qtum&nonce=현재 시간 밀리초&signature=암호화 서명 스트링을 요청합니다 //# Response { "code":100, "message" : { "des" : "success", "isSuc" : true, "datas" : { "currency":"qtum", "key":"QSWnWqpHiM7Rz2S4Ybf76seYNURPL3Z5TN" } } } 반환값 설명code : 복귀 코드 message : 제시 메시지: des : 제시 메시지: isSuc : 제시 메시지: data :{ key : 充值地址, currency : 코인 표지 } |
+- https://trade.exx.com/api/getChargeRecord
충전 레코드 획득합니다
예시//# Request GET https://trade.exx.com/api/getChargeRecord?accesskey=your_access_key¤cy=qtum&nonce=현재 시간 밀리초&pageIndex=页数&signature=암호화 서명 스트링을 요청합니다 //# Response { "code":100, "message":{ "des": "success", "isSuc": true, "datas": { "total":2, "pageSize":10, "list":[{ "amount":11.000000000, "status":"-", "hash":"2018013019033000098753290", "submit_time":"2018-01-30 19:03:31" "confirmTimes":1 }, { "amount":11.000000000, "status":"-", "hash":"2018013018533000050778882", "submit_time":"2018-01-30 18:53:31" "confirmTimes":1 }, "pageIndex":1 } } } 반환값 설명code : 복귀 코드 message : 제시 메시지: des : 제시 메시지: isSuc:제시 메시지: data:{ total : 记录数, status : 충전 상태, hash : 充值交易号 submit_time : 充值时间, confirmTimes: 确认数 } |
||||||||||||||||
+- https://trade.exx.com/api/getWithdrawAddress
인증 받은 코인 인출 주소를 획득합니다
예시//# Request GET https://trade.exx.com/api/getWithdrawAddress?accesskey=your_access_key¤cy=qtum&nonce=현재 시간 밀리초&signature=암호화 서명 스트링을 요청합니다 //# Response { "code":100, "message":{ "des": "success", "isSuc": true, "datas": [{ "memo":"备注信息", "key":"QSWnWqpHiM7Rz2S4Ybf76seYNURPL3Z5TN", "currency":"qtum" }] } } 반환값 설명code : 복귀 코드 message : 제시 메시지: des : isSuc: data:[{ memo : 비고, key : 提币地址地址, currency : 코인 표지 }] |
|||||||||||||||||
+- https://trade.exx.com/api/getWithdrawRecord
코인 인출 레코드를 획득합니다
예시//# Request GET https://trade.exx.com/api/getWithdrawRecord?accesskey=your_access_key¤cy=qtum&nonce=현재 시간 밀리초&pageIndex=页数&signature=암호화 서명 스트링을 요청합니다 //# Response { "code":100, "message":{ "des": "success", "isSuc": true, "datas": { "pageSize":10, "list":[{ "amount":11.00000000, "id":2018013084703, "status":"success", "submitTime":1517310691000, "manageTime":1517310812000, "receive":11.00000000, "toAddress":"QjedNoj5cU6M5Vv5ipWoPtZEebWBXskYnu" },{ "amount":11.00000000, "id":2018013084684, "status":"success", "submitTime":1517309701000, "manageTime":1517309912000, "receive":11.00000000, "toAddress":"QjedNoj5cU6M5Vv5ipWoPtZEebWBXskYnu" }] ,"pageIndex":1 } } } 반환값 설명code : 복귀 코드 message : 제시 메시지: des : 제시 메시지: isSuc : 제시 메시지: data :{ pageSize:每页记录数, list: amount : 코인인출 수량, id : 提币记录ID, status : 상태, submitTime : 제출 시간, manageTime : 처리 시간, receive : 到账金额, toAddress : 코인 인출 주소 } |
|||||||||||||||||
+- https://trade.exx.com/api/withdraw
코인인출
예시//# Request GET https://trade.exx.com/api/withdraw?accesskey=your_access_key&amount=10¤cy=qtum&nonce=현재 시간 밀리초&receiveAddr=코인 인출 주소&safePwd=提币密码&signature=암호화 서명 스트링을 요청합니다 //# Response { "code":100, "message":"success", "id":"2018013084703" } 반환값 설명code : 복귀 코드 message : 제시 메시지 id : 提币单号 |
예시 코드
서명 방식:secretkey에 근거하여 서명하고 요청 파라미터는 ascii값에 따라 순서대로 암호화합니다
//...... try{ //...... String params = "accesskey=yourAccessKey&nonce="+System. currentTimeMillis(); String secretKey = "yourSecretKey"; String baseURL = "https://trade.exx.com/api/getBalance"; String signature = HmacSHA512(params, secretKey); String url = baseURL + "?" + params + "&signature=" + signature; String result = doRequest(url); //String params = "accesskey=yourAccessKey&nonce=1234567890123"; //String secretKey = "yourSecretKey"; //HmacSHA512를 통해 암호화된 결과는 아래와 같습니다: //c247be4b0b3f448254e70d422d199c874afa8fe873fd25d39cc1d14e4d60700bdbe0ea681a57bf772a8c16706e8a4d4bef3cd362fcc89f03a15e7e1b9e1930b1 //...... }catch(Exception ex){ ex.printStackTrace(); } //......
에프에이큐
접근 제한
1. IP마다 초당 1000번만 접속할 수 있으며 1000번 초과하면 1시간으로 잠금할 거고 1시간후에 자동으로 잠금 해제될 것입니다.
2. 시장마다 초당 10번만 접속할 수 있으며 초당 10번 이상의 요청을 무효로 처리하겠습니다.
3.자산 인터페이스에 초당 3회까지만 접속할 수 있습니다.
4.충전 어드레스,충전 기록 인터페이스에 초당 1회까지만 접속할 수 있습니다.
5.코인 인출 권한은 생성된 API 키 작업에서 오픈할 수 있습니다.클로즈로 묵인합니다.
6. 서브아이디는 코인 인출 작업을 허락하지 않습니다.