井通Websocket命令总结

下面websocket命令是经过整理的,测试通过的,大家可以打开websocket测试工具试试。

0、Websocket测试相关链接

井通节点websocket链接:
wss://hc.jingtum.com:5020
wss://c05.jingtum.com:5020
在线websocket测试工具: http://ws.douqq.com/

1、Server_info 获取当前节点服务器信息
 {
"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 获取当前账本
 {
"id": 1,
"command": "ledger_current" }
5、Account_currencies 获取账号可以发送和接收的货币种类
 {
"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 获取账号关系信息
{
"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数据(执行错误)
 {
"id": 1,
"command": "show_blob", "tx_blob":
"120003220000000024000000032F2286ABC06840000000000033547321021909EC37BD0D183811EB3330C27A8E79FEF8954DEA8EDB DC15BE696C8266412174473045022100F2AC668AA80957B90E8E173BAF9191C0206880CCE439F069CC8A7C9DDE3F356C02204A1E1 EFF96CCDEE731870C09818448DD6474692FB546C2DD8D3BA7A5FECBAA358114D2B2D92760BB8FCADF97C6EDBD0297CDFF9D D4D8
" }
16、path_find 路径选择(执行出错)
 {
"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"
} }

作为一个开发者,有一个学习的氛围跟一个交流的圈子特别重要,下面是我们的社区交流群,不管你是小白还是大牛欢迎入住,分享经验、讨论技术、社区开发。大家一起交流学习共同成长!希望开发者少走弯路。
1.社区开发者大赛 QQ 群:568285439
2.社区论坛:http://bbswtc.com
3.社区公众号:SWTC 互动社区、SWTC 社区
4.github:https://github.com/swtcpro

你可能感兴趣的:(井通)