|
@@ -136,7 +136,7 @@ const getPolymarketIorInfo = async (ior, id) => {
|
|
|
|
|
|
|
|
let marketTypeData, outcomesSide;
|
|
let marketTypeData, outcomesSide;
|
|
|
|
|
|
|
|
- if (type === 'm') {
|
|
|
|
|
|
|
+ if (type === 'm' && !ratio) {
|
|
|
const sideKey = side === 'h' ? 'Home' : side === 'c' ? 'Away' : 'Draw';
|
|
const sideKey = side === 'h' ? 'Home' : side === 'c' ? 'Away' : 'Draw';
|
|
|
const sideAction = action === 'o' ? 'No' : 'Yes';
|
|
const sideAction = action === 'o' ? 'No' : 'Yes';
|
|
|
marketTypeData = marketsData.moneyline[sideKey];
|
|
marketTypeData = marketsData.moneyline[sideKey];
|
|
@@ -191,7 +191,7 @@ const getPinnacleIorInfo = async (ior, id) => {
|
|
|
const { lineId: straightLineId, moneyline, spreads, totals } = straightData;
|
|
const { lineId: straightLineId, moneyline, spreads, totals } = straightData;
|
|
|
const { winningMargin, exactTotalGoals } = specials;
|
|
const { winningMargin, exactTotalGoals } = specials;
|
|
|
|
|
|
|
|
- if (type === 'm' && moneyline) {
|
|
|
|
|
|
|
+ if (type === 'm' && moneyline && !action && !ratio) {
|
|
|
const sideKey = side === 'h' ? 'home' : side === 'c' ? 'away' : 'draw';
|
|
const sideKey = side === 'h' ? 'home' : side === 'c' ? 'away' : 'draw';
|
|
|
const team = side === 'h' ? 'TEAM1' : side === 'c' ? 'TEAM2' : 'DRAW';
|
|
const team = side === 'h' ? 'TEAM1' : side === 'c' ? 'TEAM2' : 'DRAW';
|
|
|
const odds = moneyline[sideKey];
|
|
const odds = moneyline[sideKey];
|
|
@@ -311,6 +311,23 @@ export const getPlatformIorsDetailInfo = async (ior, platform, id) => {
|
|
|
return getInfo[platform]?.();
|
|
return getInfo[platform]?.();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 平台盘口下注
|
|
|
|
|
+ */
|
|
|
|
|
+export const placePlatformOrder = async (ior, platform, id, stake=0) => {
|
|
|
|
|
+ const iorInfo = await getPlatformIorsDetailInfo(ior, platform, id);
|
|
|
|
|
+ const betInfo = { ...iorInfo, stakeSize: stake };
|
|
|
|
|
+ const placeOrder = {
|
|
|
|
|
+ polymarket() {
|
|
|
|
|
+ return polymarketPlaceOrder(betInfo);
|
|
|
|
|
+ },
|
|
|
|
|
+ pinnacle() {
|
|
|
|
|
+ return pinnaclePlaceOrder(betInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return placeOrder[platform]?.();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 根据最新赔率获取策略
|
|
* 根据最新赔率获取策略
|
|
|
*/
|
|
*/
|