|
|
@@ -7,6 +7,7 @@ const { WebDriver } = require('../common/web_driver')
|
|
|
const fs = require('fs')
|
|
|
const path = require('node:path')
|
|
|
const CryptoJS = require('crypto-js')
|
|
|
+const axios = require('axios')
|
|
|
|
|
|
const timeout = 9999999
|
|
|
|
|
|
@@ -289,7 +290,6 @@ describe('deepcoin站点测试', () => {
|
|
|
randomstr = randomStr(6),
|
|
|
appid = info.i
|
|
|
|
|
|
-
|
|
|
let params = {
|
|
|
'ExchangeID': 'DeepCoin',
|
|
|
'InstrumentID': '1BTCUSD',
|
|
|
@@ -303,8 +303,8 @@ describe('deepcoin站点测试', () => {
|
|
|
'UserID': '9313134',
|
|
|
|
|
|
'appid': 547798,
|
|
|
- 'randomstr': 'yw4d6k',
|
|
|
- 'timestamp': 1734787294762,
|
|
|
+ 'randomstr': 'EQDcpG',
|
|
|
+ 'timestamp': 1734795772348,
|
|
|
'convertPOST': convertPOST,
|
|
|
}
|
|
|
|
|
|
@@ -347,6 +347,51 @@ describe('deepcoin站点测试', () => {
|
|
|
sign = CryptoJS.MD5(sha256Str.toString())
|
|
|
console.info('sha256Str==>', sha256Str.toString())
|
|
|
console.info('-sign-->', sign.toString().toLocaleLowerCase())
|
|
|
+
|
|
|
+ signData.sgin = sign
|
|
|
+
|
|
|
+ axios.post('https://www.deepcoin.com/v2/public/swap/SendPositionLeverage', signData, {
|
|
|
+ headers: {
|
|
|
+ 'accept': 'application/json, text/plain, */*',
|
|
|
+ 'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
|
|
|
+ 'appid': '547798',
|
|
|
+ 'content-type': 'application/json',
|
|
|
+ 'device': 'pc-c9cdc03711159d3e72025c1e428cd4d8',
|
|
|
+ 'hmac': '7ca70f92ed75168a1089249efc074f02',
|
|
|
+ 'lang': 'zh',
|
|
|
+ 'otoken': 'TQHOtqhQqXYD2tTc/KG0KKIDoPnC861ktL8jc2bOJb3i8FF2Cz3mfwQACbSBPKk0fW1UJve4t1LjH1Uo4aHRDQ==',
|
|
|
+ 'platform': 'pc',
|
|
|
+ 'priority': 'u=1, i',
|
|
|
+ 'requestid': 'f529a1eb30a2d433e6fd2db15fe6c971',
|
|
|
+ 'sec-ch-ua': '"Microsoft Edge";v="131", "Chromium";v="131", "Not_A Brand";v="24"',
|
|
|
+ 'sec-ch-ua-mobile': '?0',
|
|
|
+ 'sec-ch-ua-platform': '"Linux"',
|
|
|
+ 'sec-fetch-dest': 'empty',
|
|
|
+ 'sec-fetch-mode': 'cors',
|
|
|
+ 'sec-fetch-site': 'same-origin',
|
|
|
+ 'timestamp': '1734795964022',
|
|
|
+ 'token': 'TQHOtqhQqXYD2tTc/KG0KKIDoPnC861ktL8jc2bOJb3i8FF2Cz3mfwQACbSBPKk0fW1UJve4t1LjH1Uo4aHRDQ==',
|
|
|
+ 'uid': '9313134',
|
|
|
+ 'x-requested-with': 'XMLHttpRequest',
|
|
|
+ 'cookie': 'sajssdk_2015_cross_new_user=1; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%229313134%22%2C%22first_id%22%3A%22193e8c24272581-04d378df0f85838-76574611-2073600-193e8c242731372%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E8%87%AA%E7%84%B6%E6%90%9C%E7%B4%A2%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC%22%2C%22%24latest_referrer%22%3A%22https%3A%2F%2Faccounts.google.com%2F%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTkzZThjMjQyNzI1ODEtMDRkMzc4ZGYwZjg1ODM4LTc2NTc0NjExLTIwNzM2MDAtMTkzZThjMjQyNzMxMzcyIiwiJGlkZW50aXR5X2xvZ2luX2lkIjoiOTMxMzEzNCIsImlkZW50aXR5X2g1X2lkIjoicGMtYzljZGMwMzcxMTE1OWQzZTcyMDI1YzFlNDI4Y2Q0ZDgifQ%3D%3D%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%229313134%22%7D%2C%22%24device_id%22%3A%22193e8c24272581-04d378df0f85838-76574611-2073600-193e8c242731372%22%7D',
|
|
|
+ 'Referer': 'https://www.deepcoin.com/zh/futures/1BTCUSD',
|
|
|
+ 'Referrer-Policy': 'strict-origin-when-cross-origin',
|
|
|
+ },
|
|
|
+ proxy: {
|
|
|
+ protocol: 'socks',
|
|
|
+ host: '127.0.0.1',
|
|
|
+ // hostname: '127.0.0.1' // Takes precedence over 'host' if both are defined
|
|
|
+ port: 3128,
|
|
|
+ },
|
|
|
+ }).then(resp => {
|
|
|
+ console.info('11>>>', resp.data)
|
|
|
+ done()
|
|
|
+ }).catch(reason => {
|
|
|
+ console.error(reason)
|
|
|
+ done()
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
done()
|
|
|
},
|
|
|
)
|