This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set initialInvestmentUsd to 142000 | |
set scOwned to 1000000 | |
set jsonBtcSc to do shell script "curl https://bittrex.com/api/v1.1/public/getticker?market=btc-sc" | |
set valueBtcSc to do shell script "sed s/[a-zA-Z:{}]//g <<< " & jsonBtcSc | |
set valueBtcSc to do shell script "sed s/.*,//g <<< " & valueBtcSc | |
set jsonUsdtBtc to do shell script "curl https://bittrex.com/api/v1.1/public/getticker?market=usdt-btc" | |
set valueUsdtBtc to do shell script "sed s/[a-zA-Z:{}]//g <<< " & jsonUsdtBtc | |
set valueUsdtBtc to do shell script "sed s/.*,//g <<< " & valueUsdtBtc | |
# set numberBtcSc to replace_chars(valueBtcSc, ".", ",") as number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { get, post } from '../../../utils/httpRequests'; | |
export const AUTH_LOGIN = 'AUTH_LOGIN'; | |
export const AUTH_LOGOUT = 'AUTH_LOGOUT'; | |
export const login = (email, password) => { | |
const params = { username: email, password }; | |
return dispatch => post('/api/login', AUTH_LOGIN, params, dispatch); | |
}; |