下面websocket命令是經(jīng)過整理的,測試通過的,大家可以打開websocket測試工具試試。
0、Websocket測試相關(guān)鏈接
井通節(jié)點websocket鏈接:
wss://hc.jingtum.com:5020
wss://c05.jingtum.com:5020
在線websocket測試工具: http://ws.douqq.com/
1损趋、Server_info 獲取當(dāng)前節(jié)點服務(wù)器信息
{
"id": 1,
"command": "server_info" }
2、Ledger 獲取賬本信息 {
"id": 1,
"command": "ledger", "full": false, "expand": false, "transactions": true, "accounts": true
}
3椅寺、Ledger_closed 獲取最新賬本
{
"id": 1,
"command": "ledger_closed" }
#####4浑槽、Ledger_current 獲取當(dāng)前賬本
{
"id": 1,
"command": "ledger_current" }
5、Account_currencies 獲取賬號可以發(fā)送和接收的貨幣種類
{
"id": 1,
"command": "account_currencies",
"account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "strict": true,
"ledger_index": "validated"
}
6返帕、Account_info 獲取賬號詳細信息
{
"id": 1,
"command": "account_info",
"account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C" }
#####7桐玻、Account_lines 獲取賬號信任線信息 {
"id": 1,
"command": "account_lines",
"account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "ledger": "current"
}
8、Account_offers 獲取賬號掛單信息
{
"id": 1,
"command": "account_offers",
"account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "ledger": "current"
}
9溉旋、Account_tx 獲取賬號交易信息 {
"id": 1,
"command": "account_tx",
"account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "ledger_index_min": -1,
"ledger_index_max": -1,
"binary": false,
"count": false,
"limit": 10
}
10畸冲、Account_relation 獲取賬號關(guān)系信息
{
"id": 1,
"command": "account_relation",
"account": " jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "relationtype": 1
}
11、Account_relcp 這個是干啥的?
{
"id": 1,
"command": "account_relcp",
"account": " jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "relationtype":1
}
12观腊、Tx 獲取交易信息
{
"id": 1,
"command": "tx",
"transaction": "5E22352233DB40E940434AB1EF5B72132EEC75020D9BD1FB031C92C00F2E3483" }
#####13邑闲、Subscribe 訂閱命令 {
"id": 1,
"command": "subscribe", "accounts": [], "streams": [
"server",
"ledger"
]
}
14、Unsubscribe 取消訂閱
{
"id": 1,
"command": "unsubscribe", "accounts": [],
"streams": [
"server",
"ledger"
]
}
15梧油、Show_blob 顯示blob數(shù)據(jù)(執(zhí)行錯誤)
{
"id": 1,
"command": "show_blob", "tx_blob":
"120003220000000024000000032F2286ABC06840000000000033547321021909EC37BD0D183811EB3330C27A8E79FEF8954DEA8EDB DC15BE696C8266412174473045022100F2AC668AA80957B90E8E173BAF9191C0206880CCE439F069CC8A7C9DDE3F356C02204A1E1 EFF96CCDEE731870C09818448DD6474692FB546C2DD8D3BA7A5FECBAA358114D2B2D92760BB8FCADF97C6EDBD0297CDFF9D D4D8
" }
16苫耸、path_find 路徑選擇(執(zhí)行出錯)
{
"id": 1,
"command": "path_find",
"source_account": "jUg9ZLzhn6koni3SfC9Mq2FvbPrGx8dCYP", "source_currencies": [{
"currency": "CNT" }],
"destination_account": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "destination_amount": {
"currency": "CNT", "value": "0.01",
"issuer": "jGa9J9TkqtBcUoHe2zqhVFFbgUVED6o9or" }
}
17、Book_offer 獲得賬號貨幣對掛單列表
{
"id": 1,
"command": "book_offers",
"taker": "jJHdzzHwrPggaBKBZZWbC6snJneSvzip5C", "taker_gets": {
"currency": "SWT" },
"taker_pays": {
"currency": "CNY",
"issuer": "jGa9J9TkqtBcUoHe2zqhVFFbgUVED6o9or"
},
"limit": 10 }
18儡陨、Submit 提交請求
{
"id": 1,
"command": "submit",
"secret": "ssCXga6r2x398DdLyN3XkLDiT2ZuS", "tx_json": {
"Flags": 0,
"TransactionType": "AccountSet",
"Account": "jLDn91zS5J1sCURGZkBGMj6WNt3dq1dery", "Fee": "13140"
} }
作為一個開發(fā)者褪子,有一個學(xué)習(xí)的氛圍跟一個交流的圈子特別重要量淌,下面是我們的社區(qū)交流群,不管你是小白還是大牛歡迎入住嫌褪,分享經(jīng)驗呀枢、討論技術(shù)、社區(qū)開發(fā)笼痛。大家一起交流學(xué)習(xí)共同成長裙秋!希望開發(fā)者少走彎路。
1.社區(qū)開發(fā)者大賽 QQ 群:568285439
2.社區(qū)論壇:http://bbswtc.com
3.社區(qū)公眾號:SWTC 互動社區(qū)缨伊、SWTC 社區(qū)
4.github:https://github.com/swtcpro