logo

NJP

Algo Stock Trading App - Live Coding Happy Hour

Import · Jul 20, 2022 · video

[Music] hey welcome to live coding happy hour this is the show where we bring you servicenow tools and tips and techniques and insight to how things are built i like to call it the antithesis of a well-polished demo we stub our toes and bang our elbows and sometimes get bloody knuckles doing this show because things may not work out right for us and they may not work out right for you so we as a community we come together and we have a lot of fun let's go around and do our introductions starting with this man to my left hi everyone i am earl gk i am a developer advocate here at servicenow i've been with the team for about a year but before that i was with higher education and a bunch of different customers pass it off to drew hello everyone my name is throw i work for accenture as a technical architect i'm also a developer mvp and a coca-cola fan pass on to pranav hey everyone good morning good evening wherever you are located my name is pranav and i'm a senior servicenow consultant at nike and i'm also a developer and community mvp for this year and that's about me and my name is chuck tomasi senior developer advocate i almost said architect i'm not even sure what a developer architect is but uh i will say i snuck a few sips from the bottle already speaking been here since 2010 doing this job for the last five years was a customer for a couple before and a long long history of it software development and related topics it is great to be here it's been a while since i've personally been on live coding happy hour and uh we are just about to launch into our tokyo season but we'll do we'll do announcements towards the end so stick around we've got a great show i'm not doing any of this except adding color commentary so the man of the hour is pranav so drinks oh the drinks yes the introduction i didn't read the notes i should have those handy let's do the introductions of our beverages same order earl uh i'm uh recovering from being sick so i have to drink water today not my normal whiskey for me we can guess what drove is having yeah you can make a blind guess but this one is bit different it's like zero sugar so smart so i'm having a protein shake i hope you're able to see it and i'll be i need recharge this reason is this guy's dedicated all right uh i just got back from a hawaiian vacation a week ago so i am having a kona brewing big wave this is brewed in hawaii so i don't think i actually had any of these we were having other beverages while we were on vacation so we'll we'll rate our drinks at the end now i'll turn it over to pranav to see what he's got for us all right so i'll be getting to my screen let me know if you're able to see my development questions covered perfect so all right so firstly like i'll just like put some idea like what we are trying to do today so it's about stock market so i know a lot of people are investors or they're buying stocks or they're doing like trading or anything so sometimes we don't have time like i like i am doing my job and i also want to do some trading and i do a repetitive step every time so um to remove that step what i'm trying to build is an app which can basically go ahead and do these things for me so this app is more of like you put your order which we call is in stock market that this is my order in the system with the proper job loss and target or whatever you want to put and after that like you you have everything defined you don't have to do it it will run on a schedule basis based on what you want how you configure the app so today we're gonna start building this app like from scratch i it was in my mind for a long time i'm trying to build something like this so let's get started so any questions before we jump into this i think we need to make a disclaimer that we are not financial advisors nor do we condone or recommend what you should do with your money um uh your mileage may vary uh good luck yeah just believe you are developing on pdi make sure before the stock bill rings i think will you yeah wake up yep yep yep and yeah what are already told disclaimer i'm not saying be registered that's an indian company indian uh institute which manages all these things no financial advice only service now all right so let's get started so firstly like this is basically my this is a broker so you need a broker account to do all these trades and all so this is the one that i use and uh like i'm not sponsoring this thing so just something i use so they provide something like the apis smart apis and all so i already created an account here so let me log in quickly so your broker has like rest apis that you can tie into yes they have the apis and other things that are there so i have to just basically go through it how it works and we have to just create some apps and also i created one historical data app long back so but this is the order thing this is all new that they brought up so basically not showing this on screen you're gonna need a new secret key after this i'll i'll definitely i'm going to create a new app and this is inactive so okay [Laughter] don't worry i'll i won't show the passwords okay so uh so let me firstly because this is my first time going through this so so what i need to do is like basic architecture wise what i thought is like we'll be having a container which is like an order like what type of is it a custom or is it something like more of uh like it's a more of a container and inside of that would be having the actual orders so what i'm seeing is we have to figure out like two things how to place an order and do some kind of authentication so see this is the order one this this is there and this is something like place an order okay i just had a funny thought when when you said order my my uh brain immediately went to the service catalog analog items to order a number of shares of a certain kind of stock that's a good thought yeah all right so yeah we we are into this place order thing so i see it's a pretty straightforward thing uh they we have to like put some this is like the data that we need to pass and we have the headers that are there so this is for place order and if i see i have to provide the private key i think that we gonna create from here like how we have this and yep we need some token so let me see if there is a token thing that's there so it's yep you can see that so okay so if we give them the client id and password with this url so we'll be getting the token so what we can do is like first thing is like i gonna i can create certain uh like apis and uh for authentication and i think it's a pretty straightforward so i'm gonna use postman and uh i hope you're able to see my postman screen uh no no we're still in your browser let me share it i think okay i have to show you guys man is a very good way to before you even get into servicenow is validate your credentials work the endpoint is valid you've got the right parameters and headers then you can start i often do that as a first step before constructing anything in an api in service now it's just sort of a validity check because if you start throwing things in service now you've got a lot of variability there's tiles you can turn and when something doesn't work you're like well okay it was a 401 and the best thing the product showed how to read an api you start within use you don't read the whole document you search for the thing that you want and then see go for authorization what it needs and then go to postman and then knock it off absolutely i agree with chuck and group like this is the same thing i do always like check everything in postman if i'm getting the response perfect i'll i'll go move forward all right so let's get back to this so i see we have a simple i don't think it's a complicated thing we have the api connect by password and this is i hope now post manager here it is yeah yep so it's a post method i can just put it post and i have the url and what headers i have to pass i have these headers so like we can do some bulk edit in the header section i hope we have to remove this this thing that kind of a part let's see for this i like the visual studio code so you can do a search and replace yeah yeah it's it's like a bit of a task now because we have given a script we should have given a postman so there is an option in postman i can't remember it's postman or if it's the other one where you could put like the the whole url endpoint and it can even parse out the query parameters and pre-build those for you yep it it is there in postman only but these are header parameters so right so that's the reason it's not able to like able we are not able to do this but if you're like i need to put it in the headers there it is yep and the time i know it's like a tedious thing but hopefully this is one time hey that's why this is live coding happy hour yep we show you the pain oh yeah oh yeah so we so by looking into this i can make out here we have still have certain more this is the one mac id on the private keystone yep so source id also okay so when looking into this i believe like this is normal content type and accept this a normal uh we have to give a local ip in public ip and mac i don't think these are mandatory and the api key this is the one that we have to generate and user is like user or web like or there should be some it should be this only user or web we can try and i have to par put some like a body also because it's a post let's put some raw body and i'll pass them this is my client id and password that i have for this so i won't show it i was expecting to take a screenshot we need to bring back our privacy shrubbery yeah uh and let's see so okay so i think that's there now let's create an app firstly so i need a trading app i don't need anything else and basically this is like the api thing so i don't think we need a like uh redirect url for it stock market this is the hard part for me to be honest selecting the name that twitter 2am i'll just put any this one uh like by instant person but we don't need the redirect url as of now because we are that's basically used for authentication and all let's see so i think app got created so perfect so we have this this is the api key that's there and i'm gonna quickly put the api key in the private key thing let's bring all your money to my account now i'm going to stop sharing now for a minute so that i can add hey there's no money here anyways markets are not opening for next seven hours so i was gonna i was gonna take your screen off this stream don't worry enough okay i didn't know that so let me just uh this entire time i've had my finger hovering over the overlay button just the blockings out really quickly mine was on print screen button all right i'll come back now again let me share it he's gonna change the keys right after this anyway yeah i i'll change everything in front of my account details yeah we'll need that so okay i have added that in the respawn like the request and i have all these things ready let's see what happens i hope it's thinking fingers crossed sending sending that's an awful long sending time yeah that's that's awful that's long do you think it needs any other parameters or something let's see the docs okay so smart apis we have the api api key and secret key well no if it's the api key it'll either be done in the header or the url because it didn't say it's oauth is it yeah it's it's like 500 internal error that's coming up so let's let's debug so we have the content type proper we have given everything we've given the api key if we give any this is the api key that's proper and we have it active let's try it once and i have given uh logging credits as proper also let me quickly verify that my threads are fine and let's see that's a very good habit of developers you know they don't trust the first thing we'll send the request to the same parameters yeah yeah yeah something something maybe there let's see because this is like night time so there might be some maintenance going on on their end yeah 500 is a server error which means it's on their end so the request is is being mangled not that it's being refused yep i think that's that's one thing let's see we can all i think you have to move it a bit uh i'm gonna put it quite try the secret key in the private key i think you've got the api key in the private key is that what the doc said uh so dark actually yeah that's a good call out actually so if i look into this so it's saying that we have to put the api key here in the private key okay so this is the api key so we don't need the secret key i'm not showing the screen by the way should i be please true isn't camera shy okay let's try otherwise we till the time we can maybe it will take some time we can try in the middle and little time we can build the app architecture something how we can proceed with that and you know it should be it's a post method and it's this i can probably do one thing quickly i have my old one so i'll try to make this one active and see if everything is there maybe this might work for us that's a good test if you had one that worked before i've done that maybe yeah because we created just now this thing so it might not be updated in the back end so it's user type xos code this is this server error and it's taking 30 seconds so thing is there is no result like response sent back we can even see what is oh no it seems like it's taking longer than let's see let's test it i will at least build the architecture maybe wait for some time for aps so you can see right this html if i visualize this thing up it should generate the html oh so hale had a good idea he said try the url directly in the browser yep you can see right it's a internal server yeah it's going to give us that yeah that's the same thing that's happening anyway so i think this is the authentication one let's do one thing we can start with the app by going through the dock what we need so what i feel is once we get the client code now once we pass the client code and password we've got to get a jwt token refresh token i think this is the one that we're going gonna need for order and uh if i go into the order place order this thing so this is the api let's go into this base order so like people who have worked with stock market so we know that like we have normal orders uh which are like just regular orders that are there there are some stop loss orders or something like amos other things that are there so so this is fine trading symbol is also fine like what kind of stock we are interested in so that's one and we have symbol token i'm not aware this might be their entity we have to search that and uh transaction type by exchange is this order type product type market this is all generic field i think based on my experience so what we can do is like so we'll be needing all these fields for sure in our uh order order table so that we can just quickly create things and there will be a flow that we have to build all right okay so let's start with the app then so we need at least two tables for now which will be one table is more of like the container like okay it's more of like how we have request and inside of it we have rit and so it will be like that so container table inside of it orders and uh let's build that app we're not using app engine studio i'm using studio for now uh good question drew it was how i like but it's like i just will be doing major things and on the floor side like let's use it market value trading yep so that's there it's a scoped app let me just do let's create this thing up i can create a new role for now like stock admin classic it's like a nostalgia feeling going backwards studio yeah you must be using aes a lot now if this is starting to feel classic yeah i know you can get that right i'm like yeah let's use it so uh for the first table which is a container i'm thinking like it's more of like extension from task reason being i'll be i need some a journal field work note or something like those field i can reuse for this so i can continue that and it will be we don't need number or anything just need a name or we can rename the short description for it and like there will be a drop down that i need which can be more of uh like order type like is it a strategy basically like this app can be used for two things one can be manual orders like you can just create manually or you can have the strategy based order so like order you can say or type and this can be a choice field drop down with none so you're gonna just uh out of curiosity you're gonna store the current uh prices of stock or something like that and no no because that's that's more of like because we get all these things uh like generally there are two types one is the market one is the limit order so you have to specify the price so we are sending the orders in the market like on the market price generally whatever the price that's going on currently just book that so if you want to limit it that may be another enhancement we can do so for now we're just keeping to normal simple thing order type is is a choice field what else i need so it can be custom strategy orders and we can create it later so i think that's fine and i i can let's go i don't see the next button is it something do i need to add click on add new field i have added it i don't need more fields so that's new scroll down that's not new it's over so it might be feeling no yeah it means yeah i had to zoom out to see that continue okay so it's the let's go so we can put the order container i'm bad at naming on that so we don't need auto numbering on it so let's take it this is one and finally and i can i need one more table which will have the actual orders so okay this will be like something you saw right in the back we need to pass certain fields based on the document all these things variety and also we're going to create all these fields in it so let's add new fields so i can probably do something here for now i'm gonna keep it as string and change it based on need but if you were in app engine studio you could have pasted this into a spreadsheet exactly with aes he's gonna be shamed into aes by the end of this show [Laughter] next type next part of it like another app if i build i'll use a yes no it's like i'm just not putting uh the first character uh like capital or something but yeah we can more of like this is basically this this app is going to have a flow that is going to run some sort of your algorithm and then it's going to place these orders based on the right thing so basically i want to keep it as simple as possible so that people don't have to build lot of like they're all algo so we're going to create new fields that may be in the second part in which we'll be having more fields and put strategies right now the scope of for today will be more of like making sure the authentication flow is running and there is an order that can be placed from servicenow so that's idea okay you don't need the field to connect that like a reference field to your previous table yeah we gonna create that later yeah for now how many how many times have you forgotten that dhruv i do that every time i was like i got a table i've got another table i forgot the reference people that's see okay i need this i need that now that was a good thing i actually forgot about it it was like the discussion this morning on slack i forgot the stupid query call you did a glad record query and you forget the query why does it tell me anything i forget to put on the dot query function in the morning and i was writing directly that on production and it was all down i think everyone has forgotten the dot query and looked at their script for an hour before yes and you feel stupid when you recognize it again thank you i just side by side ran that authentication hopefully it works i'm gonna create a new field like which i forgot about the order thing like let's make it a reference wow we gotta teach this guy form designer reform builder [Laughter] i haven't created a field through the dictionary in probably 10 years yesterday i'll tell you a story like yesterday one of the one of my counselors came in with us he was going for csa exam and he was doing some stuff on the form designer and all and he asked me and it was a shame that i have to go back on the docks to search what the hell is that you lost me on this one let's let's do that it's like not taking the validation uh now your dash is giving you crap no i i i i deserve that this is this is hardcore this is great this is what we always wanted live coding happy hour to be people just trash talking us during the stream this is how we learn oh my god like let's do it container one or a container so let's let's submit it now so we have that field created so i hope our back and architecture is somewhat there and let's go to the back and see i hope my screen is zoomed out are you able to see it go one more bigger one more is it better yeah yeah we'll see if if your field labels start appearing above your fields then we can back it down all right so okay i'll go so we have the order container and now we have this thing so we can we have to do some form layout we have to do some dictionary override so we have the name and let's do that quickly i'll also run that this thing side by side if something works hopefully admin class you can use that in an interview question what are the five ways to create a field i'm gonna sit out of that interview you know if someone asked me about entry like tata by the way are you including script all righty so you need the short description that's that's there and i'm just gonna do some like basically short description will have the name and i need to put some uh do we need activity in good activity center so that we have the activity what's happening and this there will be more fields to it and also we created our custom field that is like uh we created like strategy one right that was a choice one was the field name field was it was something container you created that forgot the name anyway that was like the for the strategy whether we have a yeah it's order type so let's save it hope they have okay so that's there now we have to just add the related list so that we have the order thing that's ready and then we're going to start building the flow for this thing later seeing this i'm feeling like i have to go back and do my admin course was this in the delta [Laughter] i don't want to fail delta again so i've been hearing some pretty serious comments about that like several questions and you have to get seven right okay so i think this is the like let's go into the stock app we have now we have the like one is the container that's there and one is the order so this is the order basically like i have the product and let me do a design again on this one thing that you forgot is the auto numbering console no we don't need we don't need order numbering because like this is like these are just order and then once they are executed so we don't need that numbering so that's why i deliberately didn't do that yeah i created that field it's not or visible container nothing works just refresh that yep that's what i'm gonna do fields are there like the ones you created i can see on the form yeah but the parent reference one is not there that's true it was not created man it was it was giving you an error we created it no this anyway i think okay maybe i create it wrong one another way of creating a field yeah we're going to hit them all this might be refreshing this might be refresher for people all right so i think that's one and i can say order container why did you put a underscore on a custom field this is like how custom fields are there and it automatically generates whenever we are creating custom so it's you underscore but it's your own scope so you can't conflict with anything yeah it's like because when we put this like this a service auto generated so we generally change it but we can put it without you underscore but generally what i felt chuck like maybe this that can be a practice because sometimes uh i know when you are in the dictionary it will be concatenating the scope but i generally do that so what do you think is it something what what is the my recommendation is pick one and be consistent yeah exactly because that's that that's how i've been doing it for a long time always start with you underscore i know it concatenates with the scope but it's like been doing it for a long time uh so cool now we have it that's perfect so now we have to have a flow that will be running on this which will be having all the details right so firstly i'm going to create something like uh we can put the data so let's start with the flow for it we have some data structure ready and let's go to the flow and i can do one more round of it hopefully it works the biggest mistake you haven't created your updates yet [Laughter] [Laughter] let's see hopefully so we'll be building some action so what i'm thinking is like there will be one action which will be doing the authentication and after the authentication it will be basically doing uh like the order placement and i believe like for every order we need to do the authentication and like we get a token and maybe the expiry for the token is like less one minute or two minutes something like that because of these are like stock apps so we have to use the refresh token to uh regenerate it so let's see let's see first how we can do it let's do a new action i generally do in this way like whenever i'm building a scoped app so i always have a prefix like like for this essay like whenever creating any flow or anything so that we can differentiate what it is generally when we are searching in a list so we tend to don't know like from which whether it's part of which app and all we can always look into the application field but generally it's not on the form so in the list so that's one category yep i can do categorization but like i generally prefer naming it also in some way uh okay and action will be place order i always put emoji in mine so it shows up at the top of the list each time okay gabby all right so first thing first we need to do a rest step so so need the connection we have to define inline and i need to create that same thing like if you remember client id incline that so i'm going to create that and let's see over to the credentials my fingers are again trust me i'm gonna do it so i'm gonna share so this can be the base url that's there and uh i need you are you authenticating as part of this action yes i'm going to authenticate it and says as is like login as password or something like that yep so it's like the credential will be stored create why not create a separate well because there's an architectural design decision you could make a separate action to authenticate exactly but then you would have to have the user remember when they're building a flow to authenticate before they can do another action yeah yeah that's the thing because if i keep it like two separate action then it's like tough to manage right so i'm putting everything in one so that if any user is trying to use it so they don't have to go into multiple place and edit it and uh the access token time duration will be very less because this is like a stock app so it can be 60 seconds or something like that so could you use it could you use a credential alias potentially it is i can i'm not sure on that but we can try that you'd have to define one and then you said it was a that that's often better than doing inline because inline gets to be very repetitive yeah yep i i because for this if we see the api key one so i don't think we can do that because these are like basic grids because you have two yeah you have two parts yep so this is like a basic red thing like because anyway we are passing a username and password and we are getting a jwd token something like so that's that could work i mean you can do basic auth in the credential alias let's see if basically that's there and uh we need to define this also right let's see and because this also segregates your actual credentials from the application so you could have separate credentials in dev and test and prod and if you were to give this away and put it on share someone just plugs in their own credentials and connects them to your alias and you're good to go and the best part is like you if you want to update you just have to update at one place instead of going in every action and updating that piece that's that's fair so let's try that so sorry uh let's let me save this thing up and then you have to define the connection as well yeah down there on the bottom we are window in a modal in a window normally i do all this up front in the platform ui but this is interesting to watch too yeah so let's see like let's give it a connection i'm a big fan of this retry policy it has saved me a lot of time man and the thing is if i if i'm like here that that that will go off it's back here somewhere i have to go the whole flow again so connection will be this and url will be there and let's save it see your connection still needs to point to the credential though so it wasn't it should be automatically uh yeah you may have to refresh though to get that list save please press save [Laughter] we didn't really build anything yet but okay yeah this was like first year but yeah good call out let's see let's refresh it [Music] and no you still have it as defined connection in line change change the connection up on top use alias yeah and this is the one and i need to your base url generally doesn't include like the login by password part but we'll go with that anyway yes it's there and so we have to build the request okay yes this is this is a post so we'll start there we don't need a resource path because it's included in that base url yep i so now like we have to manually copy it all this thing so except for the credentials you need that you need the key but the credentials will come from the credential alias yes oh let me just put it like this i have like i i think like this this should be like a bulk edit thing you get that on the idea portal yet i'm not gonna put it now after i have seen it a lot i have to do it one by one one by one but generally like for other things it's easy when there are one or two but something like this so let me just use a type we have the source id maybe it should be like variable sets where we can just have header sets oh yeah and everybody will make header sets of one header or the way i would have made it is if there's a container end inside of the cop in your clipboard then it just tabs over to the next one i don't think on this uh we need something like uh like real mac id this might yeah i'm wondering about those as well they look like they're right yep i know these are like default string thing that's there but let's see whether we really need it user type is equal to web uh sorry source is web what's your address what's your local address it's all right so i think i have added a few this was not and i need to pass in the body i have to pass like my fingers are again on that yeah same this is like i have to like so the credential will be coming from this connection area so i have to add that there so i have to create one i'm gonna quickly create this thing and all do you mind here here comes our faces oops there thanks chuck we need to make a a whoopsie overlay banner don't tempt me we have a technical difficulties overlay just a minute i think okay cool i'm done all right so you get your credentials do you have your credential connected to your connection so go back to connections okay that's a reference field on the bottom excuse me in the connection that wasn't filled in before yes so if you see right in the connection that was not filled so i went ahead and connection i added that yep so that's one now we have this thing ready and let's save it please create the column header duplicate names are not allowed to enter those header keys again please seems like a client public ipa i guess client public ips there uh localized google ips choice oh yeah duplicate right so this is there i've never known i never know that this is the functionality and this is a kind of a testing this option is also available in this step that if you put on multiple headers with the same name that's something that's going to be addressed in a smarter way in the future because there are times when you do need multiple headers with the same key just so i think the first step is there now uh as we don't have that like what kind of response we are getting i know we have a dummy response in the dark it's did you change that from get to post pronounce yes i changed that okay good i missed that so many times yeah and i i generally learned in the hard way i always put it get then i test it it fails then oh i missed it so generally after this basically i i know we're getting this kind of response so there is a json parser that's there so i need to pass the data so it generally i can put it like dummy thing and it can generate our targets so that's very easy and from there we can just use the jwt and to the next step and now we need another rest message to actually we use like to create another like the order like to place the order let's see we have a post so we have a place order this is the same url so we're gonna follow the same step that this like how we have and well in this one your jwt token is going to be dynamic is it not it will be dynamic so you may want to do this one in line because it's you're getting it from the data panel yeah let me think about that um oh you need enlightenment yeah you can't authenticate with a connection alias if you just got the token exactly that's that's the idea unless it's part of the url no this is a post method so it won't be part of the url because you've heard of the part you want to be safe also you're going to have to do this one in line yeah so let me just do this this will be the base with the request path we have to impose and glad dhruv is here to keep me sober so now we have to see what are like the parameters take care steve so we have like an authorization that we have to pass here right and let me quickly do this vectorization don't forget the other thing that i always forget is the bearer keyword oh oh yes why isn't it just authorization dash bearer or something simple don't don't put static words in my values i think like after doing this i i think i realized like we should have some kind of a variable set like as chuck you were mentioning right like which will be easy you can have the same parameter i can see like it's all same but uh don't have it let's see mine ib and we have this now another architectural decision that we kind of forged ahead without discussing is you may have wanted to consider writing this action in its own scope so that it can be its own spoke not directly attached to your application yes yeah i always forget that it's like i'm blazing through an application like i need to talk to someone oh i should make its own spoke so i can it's abstracted away and could be reused this is i also forget like i forgot actually to create it in a you spoke yeah but what like so generally it's a best practice i think to create in a sport but we generally tend to forget that you remember after about you remember after the third action man two two i think we are almost set with so right now like i'm just putting this thing i don't i hope we don't need the mac address uh because this shouldn't be mandatory thing if we have what would they do with that i've never seen anybody they might use for audit and log purpose that from which computer the orders have been placed in all of those things maybe so i think i have the api key that's there i mean we're gonna refresh it i i remember like uh like when chuck i was seeing slack integration years back josh was doing it he was showing all the passwords yeah i'm gonna reset and you should get uh this private key from somewhere you should not be yeah private this will be this will be stored we're gonna store it input and that you should have from the data panel yeah just one thing like chuck i'm not sure you can guide me like when you type in the resource part do you need a forward slash or is it the automatically pixel i we had a discussion on this at one point i haven't had any problems with it so that's uh it double slashes and urls are not a problem generally yeah if it adds one by default and you've got one there explicitly oh well but if you forget it and it's not added automatically then you get problems you get problems when you are code bringing that url from some script or something then it will act as a escape character for not forward slashes backslashes will be escaped oh yeah so i think we have said it now i know i'm putting it like this for now but this will be actually replaced from the table like the fields that we have created right so all these quantity everything that's there we need to see uh did i put it proper data is there and we can have all these things put up maybe i can use now that you're working now that you're working on the body of the request um i think that might be what you were missing in your original login um point because looking at the api documentation uh your original request was looking for a body too and i don't think you ever added that i added the body okay um you remember like i asked you like i was stop shading that was the best okay yeah cool um did you want to find a good stopping point we're getting close to the hour yeah we can just stop it like we can try once again for the authentication the test we're going over the waterfall yeah share it on gate man we can fork that and build it yeah i'm gonna probably we can have another part to it like we can have till the time hopefully the ap is working we can do it bit early multi-series yeah we haven't done that in a while yep i think it's it's gonna take time but uh i think the flow will be like this rest step we'll get the jwd token we're gonna pass it we're gonna use it in the next rest step and then we're gonna pass this thing and update our back in order did you put a data pill in there for the token it's not true it's we haven't i haven't put it right now but uh so this is something like you see right we have the jc power so that's right right so from the json password itself we can get the date token because i use this thing and we can directly use that in our like here put it but it's grayed out it's there it's data that's what you're looking for yeah and i just need to add a space if i don't have it there's a space that's why i hate that bearer keyword so many things can go wrong it's so simple but yet so finicky so i think that's the action is saved so i think we can continue this further so again here i'm gonna have to add just another json password so that and so that once we get a response from this we parse it and update the order in the back those things are so nice so that's that's there and i think i can stop here and uh let me stop sharing maybe we can continue this thing in the next part [Music] all right thank you pranav let's go around and rate our drinks as as uh interesting as they were this time you're muted earl he's chasing his own champion now just kidding i'm not muted anymore um water high quality h2o 5 out of 5 always always oh no you're in the same place how's your coke five on five man i'm almost done with two two cans he's double pumping this one and pranav five out of five perfect drink for me wow i feel kind of lame i mean the big wave golden ale from the kona brewing company went down easy um you know but i wouldn't call it i call it a good summertime go down easy beer i'm gonna give it a four and a quarter oh nice four and a quarter that's not good enough i think like somebody asked certain question like in the chat like can i use the get method and populate my custom table and use the data for pa so this is the question chuck or anyone want to take or i should take it can you use a get method and populate your table to what i didn't understand what the whole custom to my populate my custom table and use the data for performance analytics uh theoretically yes performance analytics can you can index if you wanted to find out how your stock is trending over time then yeah performance analytically do your time series just fine finally as an architecture point of view you need to store one table that shows the logs on the history of everything and then build your reports on that i think in these days in report also you can get the data ad hoc right you don't have to save it in a particular table and you can use it directly that's something i will i saw it in the reports and all but for trends and all you need to have historical data right how are you going to build it so for the historical data like you can get the data for 60 days for the api and then you can see the trend something like that in one point but you don't have to store it in service now every transaction costs money yeah it's actually cost money the other you could also possibly do it as a remote table live there's there's that to consider as well all right good stuff announcements we have tech now coming up on august 4th 8 a.m pacific time the usual time for our tech now webinars thursday this is a thursday so we're not doing this on a tuesday thursday august 4th is tokyo early access day so sometime during that day maybe before maybe after the tech now you'll be able to upgrade your pdis to tokyo as well we will be having another live coding happy hour the very next day based on something from the tokyo uh tokyo tech now i gotta try and say those words together for a while and the whole content of tokyo is available on devlink.sn tokyo we've got it by topic or category and we've got it by calendar so you you decide how you want to slice and dice that information and as we produce these podcasts and blogs and live streams we'll be updating those with links so if you missed something and you want to come back later go what was there was a video on that one thing that chuck talked about you can go back and find out similar to what we did with san diego just next step next generation of that what was that drew what's the technique now link tech now devlin.sn slash tech now we try to keep this simple so i don't have to remember a whole lot there is a link specific to that episode's registration page that episode's blog that episode's pdf when it becomes available but all of those can be found if you go to slash tech now click the top one which is the latest one episode 94 you'll get everything there so looking forward to seeing everybody there any other announcements we're missing earl the only one that we always forget to do and we're trying to be better about is if you're watching this um please like subscribe uh it helps with our numbers and our reporting we don't make money off of any of these videos or anything like that but just to know that we're actually getting good content out there that helps us if you do do those things thank you for remembering yes it is important to us to show that people are watching and caring and loving and keeping us employed i like being employed we ran a few minutes over but that's live cody happy hour sometimes that happens thank you pranav for guiding us through that thank you drew for the uh insights the colorful commentary saving us from ourselves and uh thank you earl for running all the comments and protecting the screen all the layout and operational details until next time which will probably be august 5th we don't know we may or may not have something on july 29th still working through the plans on that we got an idea that's kind of cooking in the background but hasn't been confirmed we'll know more if we do that's why you want to subscribe turn on those notifications so that you know that we've got something going until then everybody take care stay safe [Music] you

View original source

https://www.youtube.com/watch?v=GAxx2gQ56vE