# OFMF查询服务API

Field Value
HTTP_SERVER_ENDPOINT https://ofmf.movapi.com

# 查询跨链信息

根据交易哈希查询跨链信息

# Request

POST /api/v1/life-cycle

# Body

名称 必选 类型 描述
tx_hash String 交易hash
(from_tx_hash或to_tx_hash,不包含bytom_tx_hash)

# Response

名称 类型 描述
from_chain_name String 跨出链的名称
to_chain_name String 目标链的名称
from_block_height Int 跨出链的区块高度
from_block_hash String 跨出链的区块哈希
from_tx_hash String 跨出链的交易哈希
bytom_block_height Int Bytom区块高度
bytom_block_hash String Bytom区块哈希
bytom_tx_hash String Bytom交易哈希
to_block_height Int 目标链的区块高度
to_block_hash String 目标链的区块哈希
to_tx_hash String 目标链的交易哈希
to_address String 目标地址
amount Float 跨链资产输了呢
fee Float 跨链手续费
start_block_timestamp Int 开始区块的时间戳
end_block_timestamp Int 结束区块的时间戳
create_timestamp Int 创建跨链的时间戳
final_timestamp Int 完成跨链的时间戳
status String UTXO类型
direction String 跨链方向,侧链跨出为out,跨入侧链为in

示例:

// request
POST https://ofmf.movapi.com/api/v1/life-cycle

{    
    "tx_hash":"a9a4829dffdf8a2262c6b11d8777aae3dd3b9728ca2ce3776fbf57b3f6ebed22"
}

// response
{
    "from_chain_name":"VAPOR",
    "to_chain_name":"ETH",
    "from_block_height":73172585,
    "from_block_hash":"cd7d4dc556666e2731f1d7420326b2f37185836d1b0cf36fae15c7cfaaf1307d",
    "from_tx_hash":"a9a4829dffdf8a2262c6b11d8777aae3dd3b9728ca2ce3776fbf57b3f6ebed22",
    "bytom_block_height":519590,
    "bytom_block_hash":"d8f4576d76e88358d73e935eec0be43b6b3907ed838e3d356017291c8adbb459",
    "bytom_tx_hash":"7f95b3436c82f067de9727797395fc99eb0a85858ce3aec0707bc14e74c887b7",
    "to_block_height":10905725,
    "to_block_hash":"a107bd585f441e7958312c0889b90cd2512df221dd18ed068ca69ed5f0305fc0",
    "to_tx_hash":"bff4242a595afa6f5369c1748e39eadf9e96702ad4ed644499bdc263b7de12d4",
    "from_address":"vp1qga0ljgdh0v5m4y2kxk9nqhxzdlawnr56yragja",
    "to_address":"ff888686cbe4afa15584c7f385ec55547555e7d2",
    "amount":0.37409745,
    "fee":0.05,
    "start_block_timestamp":1600690159,
    "end_block_timestamp":1600690832,
    "create_timestamp":1600690224,
    "final_timestamp":1600691004,
    "status":"xchain_cross_out_succeed",
    "direction":"out"
}

# 批量查询跨链信息

根据条件查询跨链信息,所有项都可选择,但是必选其中一项

# Request

POST /api/v1/life-cycles

# Body

名称 必选 类型 描述
chain_name String 查询币种,目前支持的币种:BTC、LTC、ETH、USDT、DAI、USDC
direction String 跨链方向 in - 跨入, out - 跨出
before_timestamp Int 跨入交易所入区块时间戳之前的跨链信息(跟after_timestamp配置使用,可以查询特定时间范围的跨链信息)
after_timestamp Int 跨入交易所入区块时间戳之后的跨链信息

# Response

名称 类型 描述
data Array 数据数组
from_chain_name String 跨出链的名称
to_chain_name String 目标链的名称
from_block_height Int 跨出链的区块高度
from_block_hash String 跨出链的区块哈希
from_tx_hash String 跨出链的交易哈希
bytom_block_height Int Bytom区块高度
bytom_block_hash String Bytom区块哈希
bytom_tx_hash String Bytom交易哈希
to_block_height Int 目标链的区块高度
to_block_hash String 目标链的区块哈希
to_tx_hash String 目标链的交易哈希
to_address String 目标地址
amount Float 跨链资产输了呢
fee Float 跨链手续费
start_block_timestamp Int 开始区块的时间戳
end_block_timestamp Int 结束区块的时间戳
create_timestamp Int 创建跨链的时间戳
final_timestamp Int 完成跨链的时间戳
status String UTXO类型
direction String 跨链方向,侧链跨出为out,跨入侧链为in

示例:

// request
POST https://ofmf.movapi.com/api/v1/life-cycles

{
  "chain_name":"ETH",
  "direction":"out",
  "before_timestamp":1600690380,
  "after_timestamp":1600690750
}


// response
{
    "data": [
        {
            "from_chain_name": "VAPOR",
            "to_chain_name": "ETH",
            "from_block_height": 73172978,
            "from_block_hash": "18041af6fc7726a14be63ad0824e5ce100f5f976e9b00d956fb21acf23a1f9c9",
            "from_tx_hash": "4cc2173e97eb6e6a3950b6bcefe42a6577d97cd7b29740df813568aeb3829211",
            "bytom_block_height": 519591,
            "bytom_block_hash": "fcdd95c60b498c5dddd5a4253e206dcb876b91fa788cf0371c44e232a2c40202",
            "bytom_tx_hash": "7571c140413078bcaaf821828a3f811437d440aa369e586acdee06ff4f666b70",
            "to_block_height": 10905741,
            "to_block_hash": "60d5eb4600e569ce678d62c9fb93278a2902927f688b29f6d03d7211d461f3c2",
            "to_tx_hash": "7fe04867c053b76a5e47e292b369cb3729f96925d28963f32841bb845db843ce",
            "from_address": "vp1qeyz6y58xpvw0k5s6zekcwqxg3clvud89ts003w",
            "to_address": "d0dfa5cf001ddb52cc4e24a9ce45762c31b735ac",
            "amount": 0.052537907,
            "fee": 0.05,
            "start_block_timestamp": 1600690380,
            "end_block_timestamp": 1600690994,
            "create_timestamp": 1600690446,
            "final_timestamp": 1600691199,
            "status": "xchain_cross_out_succeed",
            "direction": "out"
        },
        {
            "from_chain_name": "VAPOR",
            "to_chain_name": "ETH",
            "from_block_height": 73172585,
            "from_block_hash": "cd7d4dc556666e2731f1d7420326b2f37185836d1b0cf36fae15c7cfaaf1307d",
            "from_tx_hash": "a9a4829dffdf8a2262c6b11d8777aae3dd3b9728ca2ce3776fbf57b3f6ebed22",
            "bytom_block_height": 519590,
            "bytom_block_hash": "d8f4576d76e88358d73e935eec0be43b6b3907ed838e3d356017291c8adbb459",
            "bytom_tx_hash": "7f95b3436c82f067de9727797395fc99eb0a85858ce3aec0707bc14e74c887b7",
            "to_block_height": 10905725,
            "to_block_hash": "a107bd585f441e7958312c0889b90cd2512df221dd18ed068ca69ed5f0305fc0",
            "to_tx_hash": "bff4242a595afa6f5369c1748e39eadf9e96702ad4ed644499bdc263b7de12d4",
            "from_address": "vp1qga0ljgdh0v5m4y2kxk9nqhxzdlawnr56yragja",
            "to_address": "ff888686cbe4afa15584c7f385ec55547555e7d2",
            "amount": 0.37409745,
            "fee": 0.05,
            "start_block_timestamp": 1600690159,
            "end_block_timestamp": 1600690832,
            "create_timestamp": 1600690224,
            "final_timestamp": 1600691004,
            "status": "xchain_cross_out_succeed",
            "direction": "out"
        },
        {
            "from_chain_name": "VAPOR",
            "to_chain_name": "ETH",
            "from_block_height": 73169667,
            "from_block_hash": "abac2867a2076db72c14d0b0ec514b5881becd55ef9340458410e0a602f75d9a",
            "from_tx_hash": "ccab424a644f0136884ca1d65414fc5e258ab3ac4f7d44da7e635f6760182dfc",
            "bytom_block_height": 519574,
            "bytom_block_hash": "f2662c6b91df619789affb6de2343125e5b919054d364dbd343caeac3e149257",
            "bytom_tx_hash": "a68ce2a7fc341244249801ff7e9fec49bd9680850e51f7654c12259b090e761f",
            "to_block_height": 10905704,
            "to_block_hash": "0932368b0fa77d8e051ce65fa38ca3adf81cc8f18899b5600d0de9a6eb2f8535",
            "to_tx_hash": "864e88c10cdb8f55e42cd845da25ec6ad1eb041b991fee483eb832f8880a39f8",
            "from_address": "vp1qgftdpmwu3m8c7p44akjukfyqzxspalc5699emt",
            "to_address": "adf8cce34cf5ff25beb17673268267e57750246b",
            "amount": 0.659133509,
            "fee": 0.02,
            "start_block_timestamp": 1600688537,
            "end_block_timestamp": 1600690570,
            "create_timestamp": 1600688603,
            "final_timestamp": 1600690779,
            "status": "xchain_cross_out_succeed",
            "direction": "out"
        },
        {
            "from_chain_name": "VAPOR",
            "to_chain_name": "ETH",
            "from_block_height": 73169633,
            "from_block_hash": "0ac3abf1813378a73b7951162469547621d91ad56caa31b68af0e62d7327fef2",
            "from_tx_hash": "dff9d2d94b515e0392924c02fd42806434849dac62826d70b56d45e0c95f4ef5",
            "bytom_block_height": 519574,
            "bytom_block_hash": "f2662c6b91df619789affb6de2343125e5b919054d364dbd343caeac3e149257",
            "bytom_tx_hash": "5183cac57acba2deeea366866ee9eb0101704ec4fdd33dc916b6c8b9aa8e7b85",
            "to_block_height": 10905701,
            "to_block_hash": "7a39b58f34aadc9b1eb4390921133d3bdb6f26a71a5af92acf0f8ea5cff4e8a2",
            "to_tx_hash": "8cfb9d54ec85f98a5d186ef125caa5fc3626a3351dede20d8452429b26d7b69a",
            "from_address": "vp1quk875k4uepq8rgv7d8n0n65lxz0nkfj8vf45kt",
            "to_address": "03421acab795f7c9ac20ed8840dca62755a18f36",
            "amount": 38.81016576,
            "fee": 0.02,
            "start_block_timestamp": 1600688514,
            "end_block_timestamp": 1600690552,
            "create_timestamp": 1600688580,
            "final_timestamp": 1600690750,
            "status": "xchain_cross_out_succeed",
            "direction": "out"
        },
        {
            "from_chain_name": "VAPOR",
            "to_chain_name": "ETH",
            "from_block_height": 73169561,
            "from_block_hash": "afdb66a07a5a74627dcd2e34321a8894e7b06bb198f942880ee4486f5cc17ad3",
            "from_tx_hash": "22df34c2c72620633275100a020fecb27f985ab355f8c4e938aad5102cc7a71e",
            "bytom_block_height": 519574,
            "bytom_block_hash": "f2662c6b91df619789affb6de2343125e5b919054d364dbd343caeac3e149257",
            "bytom_tx_hash": "46bf407b58c0f6df86ae63078708bff72fab64279368cadac6eaba5ade9a1230",
            "to_block_height": 10905701,
            "to_block_hash": "7a39b58f34aadc9b1eb4390921133d3bdb6f26a71a5af92acf0f8ea5cff4e8a2",
            "to_tx_hash": "694543561b2ea65dc68a0278b4fed588143bd9666aedce0d4d41b02b01091c9c",
            "from_address": "vp1qzulm2l4j2gnmwdkxuzhv5hq59d3uaqyd4j3t0y",
            "to_address": "c13ac0cf0e24307b13087bb2862a9972ea4d0826",
            "amount": 0.983569,
            "fee": 0.02,
            "start_block_timestamp": 1600688478,
            "end_block_timestamp": 1600690552,
            "create_timestamp": 1600688544,
            "final_timestamp": 1600690750,
            "status": "xchain_cross_out_succeed",
            "direction": "out"
        }
    ],
    "pagination": {
        "start": 1000,
        "limit": 5,
        "total": 1616,
        "_links": {
            "next": "/api/v1/life-cycles?limit=5&start=1005",
            "prev": "/api/v1/life-cycles?limit=5&start=995"
        }
    }
}

# 创建跨链地址

创建跨链地址,接入IP有白名单限制,如果非白名单IP内的请求,报错“Permission denied”

# Request

POST /api/v1/create-cross-address

# Body

名称 必选 类型 描述
chain_name String 币种信息,目前支持的币种:BTC、LTC
vapor_address String 侧链地址

# Response

名称 类型 描述
cross_address String 跨链地址

示例:

// request
POST https://ofmf.movapi.com/api/v1/create-cross-address

{
  "chain_name":"LTC",
  "vapor_address":"vp1q25mknz645mqe7qjxwnjdwahgckqy5gqxg3xjgfq5hmh24x24vvjsjeqt97"
}


// response
{
  "cross_address":"MVYz2923bokX9rhvE3P1CWTCsefsUrDWrL"
}
上次更新: 12/30/2020, 10:13:49 AM