Results 1 to 12 of 12

Thread: Anyone knows how to automate defi?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2019
    Posts
    9

    Anyone knows how to automate defi?

    For example, say I want to know the price of stuffs in pancakeswap. How would I do so? Is there an API?

    What do I want to do?

    1. Create limit order. There is no limit order in pancakeswap. Basically I want a program that scan prices in DEFI. Once the price is below or above a certain number I want to execute order
    2. Execute smart contracts.

    I have heard about nethereum.


    Currently I want to start from something simple. Send 0.1 ftm within fantom network to another and use vb.net to do so, instead of using metamask. I wonder if there is some sample codes? After that I go to there.

    I already know how to get prices in defi. I uses this code

    Code:
        Public Overrides Async Function getMarketInfoAsync() As Task
            Dim listOfInterestingpairs = fileToCol("pairs.txt")
            Dim combinedPairas = ""
    
            For i = 0 To listOfInterestingpairs.Count - 1
                If i > 0 Then
                    combinedPairas += ","
                End If
                combinedPairas += listOfInterestingpairs(i)
            Next
    
            Dim url = "https://api.dexscreener.com/latest/dex/pairs/fantom/" + combinedPairas
            Await typicalGetMarketInfobAsync(url, {}, PRICEC, PRICEC, PRICEC, PRICEC, VOLUMEC, PRICEC, "https://dexscreener.com/?={QUOTE}_{BASE}", "", BASEC, QUOTEC, "", 0)
    
            Await Task.Delay(0)
        End Function
    Basically, I am using dexscreener API. However, I want to do more than just getting info. I want to say buy BOO with FTM if price of BOO is below 70 ftm, for example. That means I will need a way to authenticate my account and use my secret keys to authorize transactions.

    How to do so? Nethereum I've heard. Nethereum is actually for Ethereum, and not Fantom, but may work. How exactly do I do that? Any tutorial for nethereum?
    Last edited by vbstudents; Jun 9th, 2022 at 04:02 AM.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,166

    Re: Anyone knows how to automate defi?

    defi?
    Pancakeswap?

    Use more words to explain what you want to achieve and have tried so far

  3. #3
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,804

    Re: Anyone knows how to automate defi?

    defi - decentralized financing ... a crypto-based decentralized financing scheme
    PancakeSwap - presumably a Crypto of some sort.

    As for an API ... how you looked at the DeFi documentation?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,166

    Re: Anyone knows how to automate defi?

    Is it an odd request the let the topic starter give some more information right from the start?
    Of course I could have Googled this myself, but I expect something extra from the ones asking for help

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,804

    Re: Anyone knows how to automate defi?

    Of course it's not an odd request... nor is it too much ... I just happen to know about defi with out looking it up ... and in the interest of just moving things along I replied ...
    Now I know better.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,166

    Re: Anyone knows how to automate defi?

    @TG I was certainly not trying to stop you for giving more information, I was merely surprised by the laziness of the topic starter!

  7. #7
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    33,804

    Re: Anyone knows how to automate defi?

    Quote Originally Posted by Arnoutdv View Post
    @TG I was certainly not trying to stop you for giving more information, I was merely surprised by the laziness of the topic starter!
    Really? Still surprised? After all this time? :/

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8
    Hyperactive Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey
    Posts
    274

    Re: Anyone knows how to automate defi?

    Quote Originally Posted by vbstudents View Post
    For example, say I want to know the price of stuffs in pancakeswap. How would I do so? Is there an API?
    what a useless question and a man thats SO MUCH LAZY THAN ME?????????????????????????????????????????
    bro there are 2 ways to do that: 1: labels 2:e.graphics.drawstring on paint event of form/picturebox
    i know a there are facebookmarketplace API etc but i never used

  9. #9
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    438

    Re: Anyone knows how to automate defi?

    Quote Originally Posted by gaouser View Post
    what a useless question and a man thats SO MUCH LAZY THAN ME?????????????????????????????????????????
    bro there are 2 ways to do that: 1: labels 2:e.graphics.drawstring on paint event of form/picturebox
    i know a there are facebookmarketplace API etc but i never used
    Gaouser, I know you're banned again, but I'm sure you'll read this. No one is as lazy as you! vbstudents has only 6 posts, but you've been making the same lazy mistakes for every post you ever created, which is at the time of my writing 233.

    You haven't provided any details when asked due to your laziness of not ever getting anything right to begin with. Your responses are always off the wall, meaningless. When you get advice, help, you never follow it, wasting everyones time like you always do since you joined VBForums.

    No one is as lazy as you, Gaouser. If you come back, I have a funny feelin' you'll make the same mistakes like if no one has ever explained to you what's right before. You never listen.

    Take this time to reread everything you posted and all the responses you got. If you can't see your problem, then expect to get banned again when you repeat the same mistakes.

  10. #10

    Thread Starter
    New Member
    Join Date
    Apr 2019
    Posts
    9

    Re: Anyone knows how to automate defi?

    First, of all I wanted to say sorry for not asking detailed questions. So I updated the questions to ask for more detail. That being said, I think I want to ask something short first like how to automate defi. After some answers like what you gave me I want to be able to give details. Given that we know secret code of an account (say, our own account), how can we authorize or send money from one account to another, and ultimately execute a smart contract.

    Do we really need nethereum or are there api?

    I found

    https://docs.nethereum.com/en/latest...aged-accounts/ on the web

    Basically I need a code like

    Code:
    var senderAddress = "0x12890d2cce102216644c59daE5baed380d84830c";
    var password = "password";
    var account = new ManagedAccount(senderAddress, password);
    var web3 = new Nethereum.Web3.Web3(account. "http://127.0.0.1:8545");
    This doesn't make sense at all.

    Why do I need account password? Where do I put account's private key? Also why I am connecting to localhost? I want to connect to a real fantom network. Where do I specify chain id?

    So anything else I should read?
    Last edited by vbstudents; Jun 9th, 2022 at 05:44 AM.

  11. #11
    Hyperactive Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Posts
    438

    Re: Anyone knows how to automate defi?

    Quote Originally Posted by vbstudents View Post
    Do we really need nethereum or are there api?
    Does PancakeSwap have documentation? You should be reading this stuff first.

    On Nethereum, I never heard of it up until now.

    Googling, I see Nethereum has docs on how to use it.

    https://docs.nethereum.com/en/latest/

    Just translate their C# code examples to VB.
    Last edited by Peter Porter; Jun 9th, 2022 at 05:53 AM.

  12. #12

    Thread Starter
    New Member
    Join Date
    Apr 2019
    Posts
    9

    Re: Anyone knows how to automate defi?

    Quote Originally Posted by Peter Porter View Post
    Does PancakeSwap have documentation? You should be reading this stuff first.

    On Nethereum, I never heard of it up until now.

    Googling, I see Nethereum has docs on how to use it.

    https://docs.nethereum.com/en/latest/

    Just translate their C# code examples to VB.
    Looks like very few want to automate fantom using vb.net

    No one doing it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width