External Adapter get deal information API
Opened this issue · 10 comments
Is your feature request related to a problem? Please describe.
GET /deal/{deal_id}?network=filecoin_calibration
Describe the solution you'd like
the return should be fit @liushmh 's requirement
@liushmh can you post the return in my comments?
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
validation
http://host:port/deals/58160&network=filecoin_calibration
json format of response:
{
"status":"success",
"data":{
"deal":{
"deal_id":61308,
"deal_cid":"bafyreibqjeplfmc7smwd3v6h3wkvh5gipxqp5fs7yt6pv63fksjvcc656i",
"message_cid":"bafy2bzacec4gsgtxcgexqa53ipxch7zlegluzbawy77bqutkecndyvlqahqao",
"height":462545,
"piece_cid":"baga6ea4seaqdfr22etwsavs7usimjlbpubd4bkqpntub57ebe3sfnib7ynqc6ea",
"verified_deal":false,
"storage_price_per_epoch":"0 AttoFIL",
"signature":"qcKpyTaIhIDRYfEJvTqmwnDDMcyq5QjaFrIAiMWbMERpfUVIyu+KVD6PflhTc8A+CjkX1sqFOoU7g9wMcJ4DA3JNw9pKc/eQx9X6fi3VrB+q3jv8nFNQ7VYBpLUhqEq6",
"signature_type":"bls",
"created_at_src":"2021-11-26 22:32:30",
"created_at":1637965950000,
"piece_size_format":"32.00 GiB",
"start_height":476911,
"end_height":2017711,
"client":"t3udgr4olzsvolib5jd7rut5liqoeja5h7r2mahuv54u5a6q2s4ibhzywlmn4h6xdasezyr4ji3diipy6aq5oa",
"client_collateral_format":"0 AttoFIL",
"provider":"t024413",
"provider_tag":"",
"verified_provider":0,
"provider_collateral_format":"0 AttoFIL",
"status":0,
"network_name":"filecoin_calibration",
"storage_price":739631457246
}
}
}
GET /{deal_id}/{network}
http://host:port/58160/filecoin_calibration
@flyworker can you change it to my format, that's much more standard.
it is not easy to understand in my opinion.
flink maybe provide more infomation than just deals, in your format, if we have more than deal, we cannot add more api,
GET /deal/{deal_id}?network=filecoin_calibration
means it is the API in Deals category.
This is the standard API support.
ok
Which fields are you using? Can you list them? Since we cannot get all of the fields as last version.
@liushmh
@DoraNebula Please post the values you have for reference
following 3 fields, thanks
"status":0,
"network_name":"filecoin_calibration",
"storage_price":739631457246
@liushmh "deal_id":61308,
"deal_cid":"bafyreibqjeplfmc7smwd3v6h3wkvh5gipxqp5fs7yt6pv63fksjvcc656i", is not needed?
not for now
currently data format and contents:
{
"status": "success",
"data": {
"deal": {
"deal_id": 100825,
"deal_cid": "bafy2bzacecfk2yizwepvjwtilhjt4qm44s7l7tphsszrykdavr4uxy3zocri6",
"message_cid": "",
"height": 45104,
"piece_cid": "baga6ea4seaqk5ozx3tyr3ksuhxulpkbvmgzeilkrsytookachqsxc4c4habuaii",
"verified_deal": false,
"storage_price_per_epoch": 62500000,
"signature": "",
"signature_type": "",
"created_at": 1599659520,
"piece_size": "134217728",
"start_height": 50814,
"end_height": 753573,
"client": "f1nslxql4pck5pq7hddlzym3orxlx35wkepzjkm3i",
"client_collateral_format": "000000000000000000",
"provider": "f019104",
"provider_tag": "",
"verified_provider": 0,
"provider_collateral_format": "000000000000000000",
"status": 0,
"network_name": "filecoin_mainnet",
"storage_price": 43922437500000
}
}
}