add 资金管理

This commit is contained in:
simple321vip
2022-09-13 16:33:17 +08:00
parent cb6db21ab5
commit 3baa441fbb
8 changed files with 306 additions and 100 deletions
+34
View File
@@ -0,0 +1,34 @@
import { trader_service } from '../utils/request'
"CTA strategy"
"query account"
const get_accounts = () => {
return trader_service({
url: '/trader/api/v1/accounts',
method: 'GET',
})
}
"get contract"
const get_contract = (symbol: string) => {
return trader_service({
url: '/trader/api/v1/contract/' + symbol,
method: 'GET',
})
}
"unload a strategy file"
const send_order = (data: any) => {
return trader_service({
url: '/trader/api/v1/order',
method: 'POST',
data: data
})
}
export {
get_accounts,
get_contract,
send_order
}