For top to bottom swiping i used following c# code it’s working fine.
//Height of ur screen.
int height = driver.Manage().Window.Size.Height; //1200
//Widhth of ur screen
int width = driver.Manage().Window.Size.Width; //720
decimal height1 = height; //1200
decimal width1 = width; //720
decimal starty1 = Decimal.Divide(90, 100); //0.9
decimal starty11 = Decimal.Multiply(height1, starty1); //1080
decimal endy1 = Decimal.Divide(20, 100); //0.2
decimal endy11 = Decimal.Multiply(height1, endy1); //240
decimal startx1 = Decimal.Divide(width1, 2); //360
driver.Swipe(Convert.ToInt32(startx1), Convert.ToInt32(starty11), Convert.ToInt32(startx1), Convert.ToInt32(endy11), 5000);
For RIGHT TO LEFT SWAPPING USE THE BELOW C# CODE
int height = driver.Manage().Window.Size.Height; //1200
int width = driver.Manage().Window.Size.Width; //720
decimal height1 = height; //1200
decimal width1 = width; //720
decimal startx1 = Decimal.Divide(90, 100); //0.9
decimal star_x = decimal.Multiply(width, startx1); //648
decimal end_x1 = Decimal.Divide(90, 1000); //0.09
decimal end_x = decimal.Multiply(width, end_x1); //64.8
decimal star_y = decimal.Divide(height1, 2); //600
driver.Swipe(Convert.ToInt32(star_x), Convert.ToInt32(star_y), Convert.ToInt32(end_x), Convert.ToInt32(star_y), 5000);