Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (1) {
- check_buy_order(function(exist){
- if (!exist) {
- get_currenct_orderbook(function(orderbook){
- get_current_balance(function(balance) {
- // 根据设置判断是否下订单
- if (need_order) {
- make_order(function(result){
- // 根据下订单的结果进行后续的操作
- })
- }
- })
- })
- } else {
- get_currenct_orderbook(function(orderbook){
- // 根据设置判断是否取消订单
- if (need_cancel) {
- cancel_order(function(result){
- // 取消订单后的一些其他的处理操作
- })
- }
- })
- }
- });
- check_sell_order(function(exist){
- if (!exist) {
- get_currenct_orderbook(function(orderbook){
- get_current_balance(function(balance) {
- // 根据设置判断是否下订单
- if (need_order) {
- make_order(function(result){
- // 根据下订单的结果进行后续的操作
- })
- }
- })
- })
- } else {
- get_currenct_orderbook(function(orderbook){
- // 根据设置判断是否取消订单
- if (need_cancel) {
- cancel_order(function(result){
- // 取消订单后的一些其他的处理操作
- })
- }
- })
- }
- });
- sleep(x)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement