|
|
@@ -15,11 +15,6 @@ const __dirname = path.dirname(__filename);
|
|
|
const polymarketMarketsCacheFile = path.join(__dirname, "../../polymarket/cache/polymarketMarketsCache.json");
|
|
|
const pinnacleGamesCacheFile = path.join(__dirname, "../../pinnacle/cache/pinnacleGamesCache.json");
|
|
|
|
|
|
-/**
|
|
|
- * USDC汇率
|
|
|
- */
|
|
|
-const USDC_RATE = 6.9;
|
|
|
-
|
|
|
/**
|
|
|
* 最小盈利率
|
|
|
*/
|
|
|
@@ -337,8 +332,8 @@ export const getSolutionByLatestIors = (iorsInfo, cross_type, retry=false) => {
|
|
|
if (item.asks) {
|
|
|
const bestAsk = [...item.asks].sort((a, b) => a.price - b.price)[askIndex];
|
|
|
const value = fixFloat(1 / bestAsk.price, 3);
|
|
|
- const maxStake = fixFloat(bestAsk.size * bestAsk.price * USDC_RATE);
|
|
|
- const minStake = fixFloat(item.min_order_size * bestAsk.price * USDC_RATE);
|
|
|
+ const maxStake = fixFloat(bestAsk.size * bestAsk.price);
|
|
|
+ const minStake = fixFloat(item.min_order_size * bestAsk.price);
|
|
|
return { value, maxStake, minStake, bestPrice: bestAsk.price };
|
|
|
}
|
|
|
else if (item.info) {
|
|
|
@@ -425,7 +420,7 @@ export const getSoulutionBetResult = async ({ iors, iorsInfo, stakeLimit, stake=
|
|
|
const betInfo = iorsInfo.map((item, index) => {
|
|
|
if (item.asks) {
|
|
|
const bestPrice = +iors[index].bestPrice;
|
|
|
- const stakeSize = fixFloat(betStakeGroup[index] / USDC_RATE / bestPrice, 0); // 必须保证买单金额小数不超过2位
|
|
|
+ const stakeSize = fixFloat(betStakeGroup[index] / bestPrice, 0); // 必须保证买单金额小数不超过2位
|
|
|
return { ...item, stakeSize, bestPrice, betIndex: index, platform: 'polymarket' }
|
|
|
}
|
|
|
else if (item.info) {
|