OPSkins / trade-opskins-api

API docs for trade.opskins.com
41 stars 19 forks source link

Allow ICaseSite cancelling Offers #60

Closed Marow closed 5 years ago

Marow commented 6 years ago

Hi,

please allow Case Sites to cancelling Offers. I want to cancel all offers from my site with over 1 Hour opened, cause after a time there to much checks needed on much users.

The System on https://github.com/OPSkins/trade-opskins-api/blob/master/ITrade/CancelOffer.md

Says: message: 'API Key not allowed to use this endpoint'

So nothing for Case Sites. I dont want to check 1 Day if the user accept the trade or not.

sofwar commented 6 years ago

I have the same error when trying to get a user's inventory

ha1331 commented 6 years ago

@sofwar that's what it's supposed to do. I think the reasoning here is, you're not supposed to use "casebot" accounts to do trades and if you don't do trades, you don't need the inventory.

Just use another account to get inventories and what ever it is you're thinking of doing with the inventories.

Marow commented 6 years ago

Really need this... some users create offers and dont accept them

ha1331 commented 6 years ago

@Marow I suggest you stop checking the trades ( or only do so in longer intervals) after a certain period of time, because these will have failed anyways. Even if the user accepts the caseopening trade after certain (unspecified) amount of time, the trade will fail. I refer you to #40 & #55

Marow commented 6 years ago

Yeah but its also not a nice way. If a user dont accept that in time, they will also not accept this after some hours after he clicked "Trade" or something.

So its nice if a bot can cancel, what he send

rannmann commented 6 years ago

I see no reason why vcase offers should be open for more than an hour. When we implement #33 then we can change vcase site offers to default to a 1 hour expiry.

Marow commented 6 years ago

I think the best way is, to allow vCase Sites the cancel function. Than can every Site run how they need.

https://github.com/OPSkins/trade-opskins-api/blob/master/ITrade/CancelOffer.md This is running, but says not allowed for vCase Site/Users

I think also 1 hour is much longer than much sites needed. When a user send a trade, than they really want to accept it in 10minutes or something. If not... they never accept it.

So please add CancelOffer for vCase Users, than can every Site run what they need

ha1331 commented 6 years ago

@Marow I suspect there would need to be either limitations to when you can cancel the case opening tradeoffer or it wouldn't be trivial to do so on the backend of what ever it is that does these opening. What I'm saying is ,compared to ordinary trades, that are either active, successful or not. These caseopening trades are different in that they are interacting with what ever blockchain they are now using. So after the user has accepted the trade, it's not completed, it's still doing something on their end and that something can fail or succeed. and it sometimes takes a long time to happen. I've seen case openings stuck at limbo for 30minutes and more, and that's after the user has accepted the trade. And I'm not even talking about back in the day when they still used ETH smart contract, recently, on this WAX thing.

I'm not saying I wouldn't prefer being able to cancel caseopening trades, I'm all for those kinds of choises. Just saying I have a feeling this is not as trivial as it sounds.

ha1331 commented 6 years ago

@Marow as a sidenote, @rannmann was refering to issue #33, which is "feature suggestion: user defined expiration". So technically each site would be able to do "what they need". Instead of you canceling the trade, you define the expiration you want, and end up with pretty much the same end result. The only difference here is who does the canceling. So if your issue is these don't expire in a time frame you prefer, then #33 should fix that for you. If instead you require canceling for something else, then you might have a valid use case to present as a reasoning for the cancel offer stuff.

Marow commented 6 years ago

Oh okay, than i dont understand at first time what he mean.

I think that he mean to do all trades for vCase Sites to 1 Hour. So if every Site can set there own expiration time its very nice than. Cause than dont need cancellation or something

Voyager-Two commented 5 years ago

https://github.com/OPSkins/trade-opskins-api/commit/93d46178574aaa20749bd4581f6aa6f179b68f1d