└── README.md /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Blockbeats RESTful-API 3 | 4 | Domain 5 | ``` 6 | https://api.theblockbeats.news/v1/ 7 | ``` 8 | ## 1 Specifications 9 | 10 | ### 1.1 Communication Protocol 11 | HTTPS protocol 12 | 13 | ### 1.2 Request Method 14 | All endpoints only support GET requests. 15 | 16 | ### 1.3 Character Encoding 17 | UTF-8 character encoding is used for both HTTPS communication 18 | 19 | ### 1.4 Request Message Structure 20 | 21 | ### 1.4.1 Flash Details 22 | - ** article ** 23 | - **Endpoint:** open-api/open-flash?size={size}&page={page}&type={type} 24 | 25 | #### 1.4.2 Query 26 | 27 | ``` 28 | "page":1, //page 29 | "size":10, //size 30 | "type":push //important news 31 | "lang":cn //language cn,en,cht 32 | ``` 33 | 34 | ### 1.7 Response Message Structure 35 | #### 1.7.1 Structure Description 36 | All endpoint responses are in JSON format. Unless specified otherwise, each response contains the following fields: 37 | 38 | Parameter Name |Description 39 | :---- |:--- 40 | title |flash title 41 | content |flash content 42 | pic |flash image 43 | link |BlockBeats link 44 | url |url 45 | create_time |create time 46 | 47 | #### 1.7.2 Response Message Example 48 | 49 | ``` 50 | { 51 | "status": 0, 52 | "message": "获取成功", 53 | "data": { 54 | "page": 1, 55 | "data": [ 56 | { 57 | "id": 147280, 58 | "title": "MULTI短时上涨逼近5美元,24小时涨幅超40%", 59 | "content": "BlockBeats 消息,5 月 28 日,行情数据显示,MULTI(Multichain)短时上涨逼近 5 美元,现报价 4.73 美元,24 小时涨幅 41.62%。", 60 | "pic": "", 61 | "link": "https://m.theblockbeats.info/flash/147280", 62 | "url": "", 63 | "create_time": "1685275243" 64 | } 65 | 66 | ] 67 | } 68 | } 69 | ``` 70 | 71 | 72 | ### 2.1 Article Details 73 | - ** article ** 74 | - **Endpoint:** open-api/open-information?size={size}&page={page}&type={type} 75 | 76 | #### 2.1.1 Quest 77 | 78 | ``` 79 | "page":1, //page 80 | "size":10, //size 81 | "type":push //important news 82 | "lang":cn //language cn,en,cht 83 | ``` 84 | 85 | All endpoint responses are in JSON format. Unless specified otherwise, each response contains the following fields: 86 | 87 | Parameter Name |Description 88 | :---- |:--- 89 | title |Article title 90 | description |Article description 91 | content |Article content 92 | link |BlockBeats link 93 | url |url 94 | create_time |create time 95 | 96 | 示例: 97 | 98 | ``` 99 | { 100 | "status": 0, 101 | "message": "获取成功", 102 | "data": { 103 | "page": "2", 104 | "data": [ 105 | { 106 | "title": "原生资产VS桥接资产:加密货币的安全之路", 107 | "description": "了解和区分加密货币的原生资产与跨链桥资产的重要性。", 108 | "content": "", 109 | "link": "https://m.theblockbeats.info/news/37335", 110 | "pic": "https://image.theblockbeats.info/headimage/2023-05-25/3f95f1423597e21500ee86c40a453e7f01676a6e.png?x-oss-process=image/quality,q_50/format,webp", 111 | "column ": "DeFi", 112 | "create_time": "1684998869", 113 | "is_original": true 114 | } 115 | ] 116 | } 117 | } 118 | ``` 119 | 120 | ## 3 Appendix - Response Code Description 121 | 122 | Response Code |Description 123 | :---- |:--- 124 | 0 |Processed successfully 125 | ## Authors 126 | 127 | - [@BlockBeats](https://theblockbeats.info) 128 | --------------------------------------------------------------------------------