Skip to content

Commit

Permalink
Fix: fixes SEND_SPOT_ALARM params
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Sep 23, 2022
1 parent e2eefc2 commit 7e6a24e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/workers/binanceSpotRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ const api = new BinanceAPI();

export default async function (job) {
return Base(job, {
requestParams : () => null,
request : () => api.spot(),
isMatching : (item, user) => {
requestParams : data => ({
asset : data.asset
}),
request : () => api.spot(),
isMatching : (item, user) => {
const sign = user.type === 'LESS' ? 1 : -1;

return (user.asset === item.asset) && ((item.price - user.limit) * sign <= 0);
Expand Down

0 comments on commit 7e6a24e

Please sign in to comment.